Class: GObjectIntrospection::Loader
- Inherits:
-
Object
- Object
- GObjectIntrospection::Loader
- Defined in:
- lib/gobject-introspection/loader.rb
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.
28 29 30 31 |
# File 'lib/gobject-introspection/loader.rb', line 28 def initialize(base_module) @base_module = base_module @version = nil end |
Instance Attribute Details
#version ⇒ Object
Returns the value of attribute version.
27 28 29 |
# File 'lib/gobject-introspection/loader.rb', line 27 def version @version end |
Class Method Details
.load(namespace, base_module, options = {}) ⇒ Object
20 21 22 23 24 |
# File 'lib/gobject-introspection/loader.rb', line 20 def load(namespace, base_module, ={}) loader = new(base_module) loader.version = [:version] loader.load(namespace) end |
Instance Method Details
#load(namespace) ⇒ Object
33 34 35 36 37 38 39 40 41 |
# File 'lib/gobject-introspection/loader.rb', line 33 def load(namespace) repository = Repository.default repository.require(namespace, @version) pre_load(repository, namespace) repository.each(namespace) do |info| load_info(info) end post_load(repository, namespace) end |