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 Method Summary collapse

Constructor Details

#initialize(klass, &block) ⇒ UserDefinedTypeInfo

Returns a new instance of UserDefinedTypeInfo.



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

def initialize klass, &block
  @klass = klass
  @properties = []
  self.instance_eval(&block) if block
end

Instance Method Details

#described_classObject



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

def described_class
  @klass
end

#install_property(property) ⇒ Object



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

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

#propertiesObject



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

def properties
  @properties
end