Module: GirFFI::InterfaceBase
Overview
Base module for modules representing GLib interfaces.
Instance Method Summary
collapse
#setup_instance_method, #setup_instance_method!
#setup_method, #setup_method!
#gtype
Methods included from TypeBase
#gir_ffi_builder, #gir_info
Instance Method Details
#setup_and_call(method, arguments, &block) ⇒ Object
14
15
16
17
18
|
# File 'lib/gir_ffi/interface_base.rb', line 14
def setup_and_call(method, arguments, &block)
method_name = setup_method method.to_s
raise NoMethodError, "undefined method `#{method}' for #{self}" unless method_name
send method_name, *arguments, &block
end
|
#to_ffi_type ⇒ Object
24
25
26
|
# File 'lib/gir_ffi/interface_base.rb', line 24
def to_ffi_type
:pointer
end
|
#wrap(ptr) ⇒ Object
20
21
22
|
# File 'lib/gir_ffi/interface_base.rb', line 20
def wrap(ptr)
ptr.to_object
end
|