Class: Furnace::SWF::Ubit
- Inherits:
-
BinData::BasePrimitive
- Object
- BinData::BasePrimitive
- Furnace::SWF::Ubit
- Defined in:
- lib/furnace-swf/swf/ubit.rb
Instance Method Summary collapse
- #do_num_bytes ⇒ Object
- #do_write(io) ⇒ Object
- #read_and_return_value(io) ⇒ Object
- #sensible_default ⇒ Object
Instance Method Details
#do_num_bytes ⇒ Object
9 10 11 |
# File 'lib/furnace-swf/swf/ubit.rb', line 9 def do_num_bytes eval_parameter(:length) / 8.0 end |
#do_write(io) ⇒ Object
5 6 7 |
# File 'lib/furnace-swf/swf/ubit.rb', line 5 def do_write(io) io.writebits(_value, eval_parameter(:length), :little) end |
#read_and_return_value(io) ⇒ Object
13 14 15 |
# File 'lib/furnace-swf/swf/ubit.rb', line 13 def read_and_return_value(io) io.readbits(eval_parameter(:length), :big) end |
#sensible_default ⇒ Object
17 18 19 |
# File 'lib/furnace-swf/swf/ubit.rb', line 17 def sensible_default 0 end |