Class: GObjectIntrospection::Loader
- Inherits:
-
Object
- Object
- GObjectIntrospection::Loader
- Includes:
- Enumerable
- Defined in:
- lib/gobject-introspection/loader.rb,
ext/gobject-introspection/rb-gi-loader.c
Defined Under Namespace
Modules: VirtualFunctionImplementable Classes: Invoker, VirtualFunctionImplementor
Constant Summary collapse
- UNKNOWN_OFFSET =
INT2NUM(0xFFFF)
Instance Attribute Summary collapse
-
#version ⇒ Object
Returns the value of attribute version.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(base_module) ⇒ Loader
constructor
A new instance of Loader.
- #load(namespace) ⇒ Object
Constructor Details
#initialize(base_module) ⇒ Loader
Returns a new instance of Loader.
33 34 35 36 |
# File 'lib/gobject-introspection/loader.rb', line 33 def initialize(base_module) @base_module = base_module @version = nil end |
Instance Attribute Details
#version ⇒ Object
Returns the value of attribute version.
32 33 34 |
# File 'lib/gobject-introspection/loader.rb', line 32 def version @version end |
Class Method Details
.initialize_instance_post(object) ⇒ Object
28 29 |
# File 'lib/gobject-introspection/loader.rb', line 28 def initialize_instance_post(object) end |
.load(namespace, base_module, options = {}) ⇒ Object
22 23 24 25 26 |
# File 'lib/gobject-introspection/loader.rb', line 22 def load(namespace, base_module, ={}) loader = new(base_module) loader.version = [:version] loader.load(namespace) end |
Instance Method Details
#load(namespace) ⇒ Object
38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/gobject-introspection/loader.rb', line 38 def load(namespace) repository = Repository.default repository.require(namespace, @version) prepare_class(@base_module) do pre_load(repository, namespace) repository.each(namespace) do |info| load_info(info) if info.is_a?(InterfaceInfo) end repository.each(namespace) do |info| load_info(info) unless info.is_a?(InterfaceInfo) end post_load(repository, namespace) end end |