spec/example.rb in bindata-1.1.0 vs spec/example.rb in bindata-1.2.0
- old
+ new
@@ -1,8 +1,12 @@
require 'bindata/base_primitive'
class ExampleSingle < BinData::BasePrimitive
- register(self.name, self)
+ register_self
+
+ def self.io_with_value(val)
+ BinData::IO.new([val].pack("V"))
+ end
private
def value_to_binary_string(val)
[val].pack("V")