Class: GirFFI::Builders::ClosureToPointerConvertor

Inherits:
Object
  • Object
show all
Defined in:
lib/gir_ffi/builders/closure_to_pointer_convertor.rb

Overview

Builder that generates code to convert closure arguments (‘user data’) from Ruby to C. Used by argument builders.

Instance Method Summary collapse

Constructor Details

#initialize(argument_name) ⇒ ClosureToPointerConvertor

Returns a new instance of ClosureToPointerConvertor.



8
9
10
# File 'lib/gir_ffi/builders/closure_to_pointer_convertor.rb', line 8

def initialize(argument_name)
  @argument_name = argument_name
end

Instance Method Details

#conversionObject



12
13
14
# File 'lib/gir_ffi/builders/closure_to_pointer_convertor.rb', line 12

def conversion
  "GirFFI::ArgHelper.store(#{@argument_name})"
end