Module: FFI::StructWrapper::ClassMethods

Included in:
FFI::StructWrapper
Defined in:
lib/ffi/struct_wrapper.rb

Overview

Additional class methods for StructWrapper

Instance Method Summary collapse

Instance Method Details

#by_refType

Returns represents a pointer to the wrapped struct.

Returns:

  • (Type)

    represents a pointer to the wrapped struct



70
71
72
# File 'lib/ffi/struct_wrapper.rb', line 70

def by_ref
  @by_ref ||= ByReference.new(self)
end

#by_valueType

Returns represents passing wrapped struct by value.

Returns:

  • (Type)

    represents passing wrapped struct by value



75
76
77
# File 'lib/ffi/struct_wrapper.rb', line 75

def by_value
  self
end