Method: BinData::IO::RawIO#initialize

Defined in:
lib/bindata/io.rb

#initialize(io) ⇒ RawIO

Returns a new instance of RawIO.



316
317
318
319
320
321
322
323
324
325
# File 'lib/bindata/io.rb', line 316

def initialize(io)
  @io = io
  @pos = 0

  if is_seekable?(io)
    @initial_pos = io.pos
  else
    singleton_class.prepend(UnSeekableIO)
  end
end