Module: BinData::BitAligned
- Defined in:
- lib/bindata/alignment.rb
Overview
Defined Under Namespace
Classes: BitAlignedIO
Instance Method Summary collapse
Instance Method Details
#do_num_bytes ⇒ Object
62 63 64 |
# File 'lib/bindata/alignment.rb', line 62 def do_num_bytes super.to_f end |
#do_write(io) ⇒ Object
66 67 68 |
# File 'lib/bindata/alignment.rb', line 66 def do_write(io) value_to_binary_string(_value).each_byte { |v| io.writebits(v, 8, :big) } end |
#read_and_return_value(io) ⇒ Object
58 59 60 |
# File 'lib/bindata/alignment.rb', line 58 def read_and_return_value(io) super(BitAlignedIO.new(io)) end |