Class: GirFFI::Builder::Type::Unintrospectable
- Inherits:
-
Object
- Object
- Base
- RegisteredType
- Object
- GirFFI::Builder::Type::Unintrospectable
- Defined in:
- lib/gir_ffi/builder/type/unintrospectable.rb
Overview
Implements the creation of a class representing an object type for which no data is found in the GIR. Typically, these are created to cast objects returned by a function that returns an interface.
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Object
Methods included from WithMethods
#has_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
#instantiate_class ⇒ Object
11 12 13 14 15 16 17 |
# File 'lib/gir_ffi/builder/type/unintrospectable.rb', line 11 def instantiate_class gtype = target_gtype CACHE[gtype] ||= Class.new(superclass) @klass = CACHE[gtype] @structklass = get_or_define_class @klass, :Struct, layout_superclass setup_class unless already_set_up end |
#setup_class ⇒ Object
19 20 21 22 23 24 |
# File 'lib/gir_ffi/builder/type/unintrospectable.rb', line 19 def setup_class setup_constants setup_layout setup_interfaces setup_gtype_getter end |
#setup_instance_method(method) ⇒ Object
26 27 28 |
# File 'lib/gir_ffi/builder/type/unintrospectable.rb', line 26 def setup_instance_method method false end |