Parent

Methods

FFI::StructLayout::InnerStruct

Public Instance Methods

get(ptr) click to toggle source
# File lib/ffi/struct.rb, line 63
def get(ptr)
  type.struct_class.new(ptr.slice(self.offset, self.size))
end
put(ptr, value) click to toggle source
# File lib/ffi/struct.rb, line 67
def put(ptr, value)
  raise TypeError, "wrong value type (expected #{type.struct_class}" unless value.is_a?(type.struct_class)
  ptr.slice(self.offset, self.size).__copy_from__(value.pointer, self.size)
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.