class GObjectIntrospection::Loader

Attributes

version[RW]

Public Class Methods

load(namespace, base_module, options={}) click to toggle source
# File gobject-introspection/lib/gobject-introspection/loader.rb, line 22
def load(namespace, base_module, options={})
  loader = new(base_module)
  loader.version = options[:version]
  loader.load(namespace)
end
new(base_module) click to toggle source
# File gobject-introspection/lib/gobject-introspection/loader.rb, line 30
def initialize(base_module)
  @base_module = base_module
  @version = nil
end

Public Instance Methods

load(namespace) click to toggle source
# File gobject-introspection/lib/gobject-introspection/loader.rb, line 35
def load(namespace)
  repository = Repository.default
  repository.require(namespace, @version)
  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