Class: FFI::Chm::Struct::SR
- Inherits:
-
BinData::Primitive
- Object
- BinData::Primitive
- FFI::Chm::Struct::SR
- Includes:
- Shortcut
- Defined in:
- lib/ffi-chm/struct/sr.rb
Defined Under Namespace
Modules: Shortcut
Instance Method Summary collapse
Methods included from Shortcut
Instance Method Details
#get ⇒ Object
12 13 14 15 16 17 |
# File 'lib/ffi-chm/struct/sr.rb', line 12 def get size = prefix.size ret = bits.inject(0){|r, v| r << 1 | v} ret += 2 << (eval_parameter(:r) + size - 3) if size > 1 ret end |
#num_bits ⇒ Object
8 9 10 |
# File 'lib/ffi-chm/struct/sr.rb', line 8 def num_bits eval_parameter(:r) + [0, prefix.size - 2].max end |