Class: GirFFI::Builders::SignalBuilder
Overview
Implements the creation of a signal module for handling a particular signal. The type will be attached to the appropriate class.
Instance Attribute Summary
#info
Instance Method Summary
collapse
#build_class, #initialize
#const_defined_for, #get_or_define_class, #get_or_define_module, #optionally_define_constant
Instance Method Details
#container_class ⇒ Object
42
43
44
|
# File 'lib/gir_ffi/builders/signal_builder.rb', line 42
def container_class
@container_class ||= Builder.build_class(container_info)
end
|
#container_info ⇒ Object
46
47
48
|
# File 'lib/gir_ffi/builders/signal_builder.rb', line 46
def container_info
@container_info ||= info.container
end
|
#instantiate_class ⇒ Object
14
15
16
17
18
19
20
21
|
# File 'lib/gir_ffi/builders/signal_builder.rb', line 14
def instantiate_class
unless already_set_up
klass.extend SignalBase
setup_constants
klass.class_eval mapping_method_definition
end
klass
end
|
#klass ⇒ Object
23
24
25
|
# File 'lib/gir_ffi/builders/signal_builder.rb', line 23
def klass
@klass ||= get_or_define_module container_class, @classname
end
|
#mapping_method_definition ⇒ Object