class FFI::StructLayout::Mapped
Public Class Methods
Calls superclass method
# File lib/ffi/struct_layout.rb, line 82 def initialize(name, offset, type, orig_field) @orig_field = orig_field super(name, offset, type) end
Public Instance Methods
# File lib/ffi/struct_layout.rb, line 87 def get(ptr) type.from_native(@orig_field.get(ptr), nil) end
# File lib/ffi/struct_layout.rb, line 91 def put(ptr, value) @orig_field.put(ptr, type.to_native(value, nil)) end