Class: GirFFI::UserDefinedTypeInfo

Inherits:
Object
  • Object
show all
Defined in:
lib/gir_ffi/user_defined_type_info.rb

Overview

Represents a user defined type, conforming, as needed, to the interface of GObjectIntrospection::IObjectInfo.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(klass) {|_self| ... } ⇒ UserDefinedTypeInfo

Returns a new instance of UserDefinedTypeInfo.

Yields:

  • (_self)

Yield Parameters:



10
11
12
13
14
15
# File 'lib/gir_ffi/user_defined_type_info.rb', line 10

def initialize klass
  @klass = klass
  @properties = []
  @vfunc_implementations = []
  yield self if block_given?
end

Instance Attribute Details

#g_nameObject



35
36
37
# File 'lib/gir_ffi/user_defined_type_info.rb', line 35

def g_name
  @g_name ||= @klass.name
end

#propertiesObject (readonly)

Returns the value of attribute properties.



8
9
10
# File 'lib/gir_ffi/user_defined_type_info.rb', line 8

def properties
  @properties
end

#vfunc_implementationsObject (readonly)

Returns the value of attribute vfunc_implementations.



8
9
10
# File 'lib/gir_ffi/user_defined_type_info.rb', line 8

def vfunc_implementations
  @vfunc_implementations
end

Instance Method Details

#described_classObject



17
18
19
# File 'lib/gir_ffi/user_defined_type_info.rb', line 17

def described_class
  @klass
end

#find_instance_method(_method) ⇒ Object



29
30
31
# File 'lib/gir_ffi/user_defined_type_info.rb', line 29

def find_instance_method _method
  nil
end

#install_property(property) ⇒ Object



21
22
23
# File 'lib/gir_ffi/user_defined_type_info.rb', line 21

def install_property property
  @properties << UserDefinedPropertyInfo.new(property)
end

#install_vfunc_implementation(name, implementation) ⇒ Object



25
26
27
# File 'lib/gir_ffi/user_defined_type_info.rb', line 25

def install_vfunc_implementation name, implementation
  @vfunc_implementations << VFuncImplementation.new(name, implementation)
end