Class: GirFFI::UnintrospectableTypeInfo
- Inherits:
-
Object
- Object
- GirFFI::UnintrospectableTypeInfo
- Defined in:
- lib/gir_ffi/unintrospectable_type_info.rb
Overview
Represents a type not found in the GIR, conforming, as needed, to the interface of GObjectIntrospection::IObjectInfo.
Instance Attribute Summary collapse
-
#g_type ⇒ Object
readonly
Returns the value of attribute g_type.
Instance Method Summary collapse
- #fields ⇒ Object
- #info_type ⇒ Object
-
#initialize(gtype, gir = GObjectIntrospection::IRepository.default, gobject = ::GObject) ⇒ UnintrospectableTypeInfo
constructor
A new instance of UnintrospectableTypeInfo.
- #interfaces ⇒ Object
- #namespace ⇒ Object
- #parent ⇒ Object
- #safe_name ⇒ Object
Constructor Details
#initialize(gtype, gir = GObjectIntrospection::IRepository.default, gobject = ::GObject) ⇒ UnintrospectableTypeInfo
7 8 9 10 11 12 13 |
# File 'lib/gir_ffi/unintrospectable_type_info.rb', line 7 def initialize(gtype, gir = GObjectIntrospection::IRepository.default, gobject = ::GObject) @g_type = gtype @gir = gir @gobject = gobject end |
Instance Attribute Details
#g_type ⇒ Object (readonly)
Returns the value of attribute g_type.
5 6 7 |
# File 'lib/gir_ffi/unintrospectable_type_info.rb', line 5 def g_type @g_type end |
Instance Method Details
#fields ⇒ Object
38 39 40 |
# File 'lib/gir_ffi/unintrospectable_type_info.rb', line 38 def fields [] end |
#info_type ⇒ Object
15 16 17 |
# File 'lib/gir_ffi/unintrospectable_type_info.rb', line 15 def info_type :unintrospectable end |
#interfaces ⇒ Object
32 33 34 35 36 |
# File 'lib/gir_ffi/unintrospectable_type_info.rb', line 32 def interfaces @gobject.type_interfaces(@g_type).map do |gtype| @gir.find_by_gtype gtype end.compact end |
#namespace ⇒ Object
28 29 30 |
# File 'lib/gir_ffi/unintrospectable_type_info.rb', line 28 def namespace parent.namespace end |
#parent ⇒ Object
23 24 25 26 |
# File 'lib/gir_ffi/unintrospectable_type_info.rb', line 23 def parent parent_gtype = @gobject.type_parent(@g_type) @gir.find_by_gtype(parent_gtype) || self.class.new(parent_gtype, @gir, @gobject) end |
#safe_name ⇒ Object
19 20 21 |
# File 'lib/gir_ffi/unintrospectable_type_info.rb', line 19 def safe_name @gobject.type_name @g_type end |