Class: GirFFI::Builders::UnintrospectableBuilder

Inherits:
ObjectBuilder show all
Defined in:
lib/gir_ffi/builders/unintrospectable_builder.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 GirFFI::BaseTypeBuilder

#info

Instance Method Summary collapse

Methods inherited from ObjectBuilder

#find_property, #find_signal, #object_class_struct

Methods included from WithLayout

#layout_specification

Methods included from WithMethods

#setup_method

Methods inherited from GirFFI::BaseTypeBuilder

#build_class, #initialize

Methods included from GirFFI::BuilderHelper

#const_defined_for, #get_or_define_class, #get_or_define_module, #optionally_define_constant

Constructor Details

This class inherits a constructor from GirFFI::BaseTypeBuilder

Instance Method Details

#instantiate_classObject



9
10
11
# File 'lib/gir_ffi/builders/unintrospectable_builder.rb', line 9

def instantiate_class
  setup_class unless already_set_up
end

#klassObject



13
14
15
# File 'lib/gir_ffi/builders/unintrospectable_builder.rb', line 13

def klass
  @klass ||= TypeBuilder::CACHE[target_gtype] ||= Class.new(superclass)
end

#setup_classObject



17
18
19
20
21
22
# File 'lib/gir_ffi/builders/unintrospectable_builder.rb', line 17

def setup_class
  setup_constants
  setup_layout
  setup_interfaces
  setup_gtype_getter
end

#setup_instance_method(method) ⇒ Object



24
25
26
# File 'lib/gir_ffi/builders/unintrospectable_builder.rb', line 24

def setup_instance_method method
  false
end