Method: BinData::Base.read

Defined in:
lib/bindata/base.rb

.read(io, *args, &block) ⇒ Object

Instantiates this class and reads from io, returning the newly created data object. args will be used when instantiating.



19
20
21
22
23
# File 'lib/bindata/base.rb', line 19

def read(io, *args, &block)
  obj = self.new(*args)
  obj.read(io, &block)
  obj
end