rdf-mongo 0.1.8 → 0.1.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/VERSION +1 -1
  2. data/lib/rdf/mongo.rb +18 -0
  3. metadata +3 -3
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.8
1
+ 0.1.9
@@ -74,6 +74,24 @@ module RDF
74
74
 
75
75
  class Repository < ::RDF::Repository
76
76
 
77
+ def self.load(filenames, options = {:host => 'localhost', :port => 27017, :db => 'quadb'}, &block)
78
+ self.new(options) do |repository|
79
+ [filenames].flatten.each do |filename|
80
+ repository.load(filename, options)
81
+ end
82
+
83
+ if block_given?
84
+ case block.arity
85
+ when 1 then block.call(repository)
86
+ else repository.instance_eval(&block)
87
+ end
88
+ end
89
+ end
90
+ end
91
+
92
+
93
+
94
+
77
95
  def db
78
96
  @db
79
97
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 1
8
- - 8
9
- version: 0.1.8
8
+ - 9
9
+ version: 0.1.9
10
10
  platform: ruby
11
11
  authors:
12
12
  - Pius Uzamere
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-04-18 00:00:00 -04:00
17
+ date: 2010-04-26 00:00:00 -04:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency