lib/bindata/buffer.rb in bindata-2.3.3 vs lib/bindata/buffer.rb in bindata-2.3.4
- old
+ new
@@ -7,16 +7,16 @@
# fill the buffer. Short reads will skip over unused bytes and short writes
# will pad the substream with "\0" bytes.
#
# require 'bindata'
#
- # obj = BinData::Buffer.new(:length => 5, :type => [:string, {:value => "abc"}])
+ # obj = BinData::Buffer.new(length: 5, type: [:string, {value: "abc"}])
# obj.to_binary_s #=> "abc\000\000"
#
#
# class MyBuffer < BinData::Buffer
- # default_parameter :length => 8
+ # default_parameter length: 8
#
# endian :little
#
# uint16 :num1
# uint16 :num2
@@ -32,13 +32,13 @@
#
# class StringTable < BinData::Record
# endian :little
#
# uint16 :table_size_in_bytes
- # buffer :strings, :length => :table_size_in_bytes do
- # array :read_until => :eof do
+ # buffer :strings, length: :table_size_in_bytes do
+ # array read_until: :eof do
# uint8 :len
- # string :str, :length => :len
+ # string :str, length: :len
# end
# end
# end
#
#