class GirFFI::Builder::Type::Unintrospectable

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.

Public Class Methods

new(gtype) click to toggle source

FIXME: Breaks parent interface.

# File lib/gir_ffi/builder/type/unintrospectable.rb, line 11
def initialize gtype
  @gtype = gtype
  @info = nil
end

Public Instance Methods

instantiate_class() click to toggle source
# File lib/gir_ffi/builder/type/unintrospectable.rb, line 16
def instantiate_class
  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() click to toggle source
# File lib/gir_ffi/builder/type/unintrospectable.rb, line 27
def setup_class
  setup_constants
  setup_layout
  setup_interfaces
  setup_gtype_getter
end
setup_instance_method(method) click to toggle source
# File lib/gir_ffi/builder/type/unintrospectable.rb, line 34
def setup_instance_method method
  false
end
target_gtype() click to toggle source
# File lib/gir_ffi/builder/type/unintrospectable.rb, line 23
def target_gtype
  @gtype
end