Class: GirFFI::Builder::Type::Object
- Inherits:
-
RegisteredType
- Object
- Base
- RegisteredType
- GirFFI::Builder::Type::Object
- Includes:
- WithLayout, WithMethods
- Defined in:
- lib/gir_ffi/builder/type/object.rb
Overview
Implements the creation of a class representing a GObject Object.
Direct Known Subclasses
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods included from WithMethods
#has_instance_method, #setup_instance_method, #setup_method
Methods inherited from Base
Methods included from GirFFI::BuilderHelper
#const_defined_for, #optionally_define_constant
Constructor Details
This class inherits a constructor from GirFFI::Builder::Type::Base
Instance Method Details
#find_property(property_name) ⇒ Object
28 29 30 31 32 33 34 35 36 |
# File 'lib/gir_ffi/builder/type/object.rb', line 28 def find_property property_name info.properties.each do |prop| return prop if prop.name == property_name end if parent return superclass.find_property property_name end raise "Property #{property_name} not found" end |
#find_signal(signal_name) ⇒ Object
16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/gir_ffi/builder/type/object.rb', line 16 def find_signal signal_name signal_definers.each do |inf| inf.signals.each do |sig| return sig if sig.name == signal_name end end if parent return superclass.find_signal signal_name end raise "Signal #{signal_name} not found" end |