lib/bindata/base.rb in bindata-1.8.2 vs lib/bindata/base.rb in bindata-1.8.3

- old
+ new

@@ -231,19 +231,20 @@ else "obj" end end - # Returns the offset of this object wrt to its most distant ancestor. - def offset + # Returns the offset (in bytes) of this object with respect to its most + # distant ancestor. + def abs_offset if @parent - @parent.offset + @parent.offset_of(self) + @parent.abs_offset + @parent.offset_of(self) else 0 end end - # Returns the offset of this object wrt to its parent. + # Returns the offset (in bytes) of this object with respect to its parent. def rel_offset if @parent @parent.offset_of(self) else 0