Method: BinData::Struct#offset_of
- Defined in:
- lib/bindata/struct.rb
#offset_of(child) ⇒ Object
:nodoc:
132 133 134 135 136 |
# File 'lib/bindata/struct.rb', line 132 def offset_of(child) #:nodoc: instantiate_all_objs sum = sum_num_bytes_below_index(find_index_of(child)) child.bit_aligned? ? sum.floor : sum.ceil end |