Class: BitGirder::Io::BinaryIo

Inherits:
BitGirderClass
  • Object
show all
Defined in:
lib/bitgirder/io.rb

Direct Known Subclasses

BinaryReader, BinaryWriter

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#convObject (readonly)

Returns the value of attribute conv.



740
741
742
# File 'lib/bitgirder/io.rb', line 740

def conv
  @conv
end

#posObject (readonly)

pos returns the zero-indexed position of the next byte that would be read, in the case of a reader, or the number of bytes that have been written in the case of a writer. This value is only valid as long as no exceptions have been encountered in any of the read|write methods and all access to the underlying io object has been through this instance the read* methods



747
748
749
# File 'lib/bitgirder/io.rb', line 747

def pos
  @pos
end

Instance Method Details

#closeObject



750
751
752
# File 'lib/bitgirder/io.rb', line 750

def close
    @io.close if @io.respond_to?( :close )
end