Permalink
Browse files

gi: Loader supports version

  • Loading branch information...
kou committed Mar 22, 2013
1 parent 150d58e commit 28e3ee89ace40b9337a1465363858a72918a3062
Showing with 5 additions and 2 deletions.
  1. +5 −2 gobject-introspection/lib/gobject-introspection/loader.rb
@@ -17,19 +17,22 @@
module GObjectIntrospection
class Loader
class << self
- def load(namespace, base_module)
+ def load(namespace, base_module, options={})
loader = new(base_module)
+ loader.version = options[:version]
loader.load(namespace)
end
end
+ attr_accessor :version
def initialize(base_module)
@base_module = base_module
+ @version = nil
end
def load(namespace)
repository = Repository.default
- repository.require(namespace)
+ repository.require(namespace, @version)
pre_load(repository, namespace)
repository.each(namespace) do |info|
load_info(info)

0 comments on commit 28e3ee8

Please sign in to comment.