Class: GirFFI::Builders::UnintrospectableBoxedBuilder

Inherits:
RegisteredTypeBuilder show all
Includes:
StructLike
Defined in:
lib/gir_ffi/builders/unintrospectable_boxed_builder.rb

Overview

Implements the creation of a class representing a boxed type for which no data is found in the GIR.

Instance Attribute Summary

Attributes inherited from GirFFI::BaseTypeBuilder

#info

Instance Method Summary collapse

Methods included from StructLike

#setup_field_accessors

Methods included from WithLayout

#layout_specification

Methods inherited from RegisteredTypeBuilder

#setup_instance_method, #setup_method, #target_gtype

Methods inherited from GirFFI::BaseTypeBuilder

#build_class, #initialize, #instantiate_class

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

#klassObject



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

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

#layout_superclassObject



26
27
28
# File 'lib/gir_ffi/builders/unintrospectable_boxed_builder.rb', line 26

def layout_superclass
  GirFFI::Struct
end

#setup_classObject



17
18
19
20
# File 'lib/gir_ffi/builders/unintrospectable_boxed_builder.rb', line 17

def setup_class
  setup_layout
  setup_constants
end

#superclassObject



22
23
24
# File 'lib/gir_ffi/builders/unintrospectable_boxed_builder.rb', line 22

def superclass
  BoxedBase
end