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 inherited from RegisteredTypeBuilder

#setup_method, #target_gtype

Methods inherited from GirFFI::BaseTypeBuilder

#build_class, #initialize

Methods included from GirFFI::BuilderHelper

#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
# File 'lib/gir_ffi/builders/unintrospectable_builder.rb', line 17

def setup_class
  setup_constants
  setup_layout
  setup_interfaces
end

#setup_instance_method(_method) ⇒ Object



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

def setup_instance_method _method
  false
end