Parent

FFI::StructLayout

Public Instance Methods

offset_of(field_name) click to toggle source

@return [Numeric] Get the offset of a field.

# File lib/ffi/struct.rb, line 38
def offset_of(field_name)
  self[field_name].offset
end
offsets() click to toggle source

@return [Array<Array(Symbol, Numeric)> Get an array of tuples (field name, offset of the field).

# File lib/ffi/struct.rb, line 32
def offsets
  members.map { |m| [ m, self[m].offset ] }
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.