Module: GirFFI::Builder::Type::WithMethods

Included in:
Interface, StructBased, Union
Defined in:
lib/gir_ffi/builder/type/with_methods.rb

Overview

Implements method creation for types such as, :union, :struct, :object, :interface.

Instance Method Summary collapse

Instance Method Details

#has_instance_method(method) ⇒ Object



20
21
22
# File 'lib/gir_ffi/builder/type/with_methods.rb', line 20

def has_instance_method method
  !!instance_method_introspection_data(method)
end

#setup_instance_method(method) ⇒ Object



15
16
17
18
# File 'lib/gir_ffi/builder/type/with_methods.rb', line 15

def setup_instance_method method
  go = instance_method_introspection_data method
  attach_and_define_method method, go, build_class
end

#setup_method(method) ⇒ Object



10
11
12
13
# File 'lib/gir_ffi/builder/type/with_methods.rb', line 10

def setup_method method
  go = method_introspection_data method
  attach_and_define_method method, go, meta_class
end