rdf-do 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/rdf/do.rb +7 -7
- data/lib/rdf/do/version.rb +1 -1
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.3.
|
1
|
+
0.3.1
|
data/lib/rdf/do.rb
CHANGED
@@ -195,7 +195,7 @@ module RDF
|
|
195
195
|
# @param [Proc] &block
|
196
196
|
# @return [Enumerable::Enumerator, void]
|
197
197
|
def each(&block)
|
198
|
-
return ::
|
198
|
+
return RDF::Enumerator.new(self,:each) unless block_given?
|
199
199
|
reader = result(@adapter.each_sql)
|
200
200
|
while reader.next!
|
201
201
|
block.call(RDF::Statement.new(
|
@@ -213,7 +213,7 @@ module RDF
|
|
213
213
|
# @param [Proc] &block
|
214
214
|
# @return [Enumerable::Enumerator, void]
|
215
215
|
def each_subject(&block)
|
216
|
-
return ::
|
216
|
+
return RDF::Enumerator.new(self,:each_subject) unless block_given?
|
217
217
|
reader = result(@adapter.each_subject_sql)
|
218
218
|
while reader.next!
|
219
219
|
block.call(unserialize(reader.values[0]))
|
@@ -227,7 +227,7 @@ module RDF
|
|
227
227
|
# @param [Proc] &block
|
228
228
|
# @return [Enumerable::Enumerator, void]
|
229
229
|
def each_predicate(&block)
|
230
|
-
return ::
|
230
|
+
return RDF::Enumerator.new(self,:each_predicate) unless block_given?
|
231
231
|
reader = result(@adapter.each_predicate_sql)
|
232
232
|
while reader.next!
|
233
233
|
block.call(unserialize(reader.values[0]))
|
@@ -241,7 +241,7 @@ module RDF
|
|
241
241
|
# @param [Proc] &block
|
242
242
|
# @return [Enumerable::Enumerator, void]
|
243
243
|
def each_object(&block)
|
244
|
-
return ::
|
244
|
+
return RDF::Enumerator.new(self,:each_object) unless block_given?
|
245
245
|
reader = result(@adapter.each_object_sql)
|
246
246
|
while reader.next!
|
247
247
|
block.call(unserialize(reader.values[0]))
|
@@ -255,7 +255,7 @@ module RDF
|
|
255
255
|
# @param [Proc] &block
|
256
256
|
# @return [Enumerable::Enumerator, void]
|
257
257
|
def each_context(&block)
|
258
|
-
return ::
|
258
|
+
return RDF::Enumerator.new(self,:each_context) unless block_given?
|
259
259
|
reader = result(@adapter.each_context_sql)
|
260
260
|
while reader.next!
|
261
261
|
context = unserialize(reader.values[0])
|
@@ -277,9 +277,9 @@ module RDF
|
|
277
277
|
def query(pattern, &block)
|
278
278
|
case pattern
|
279
279
|
when RDF::Statement
|
280
|
-
query(pattern.to_hash)
|
280
|
+
query(pattern.to_hash, &block)
|
281
281
|
when Array
|
282
|
-
query(RDF::Statement.new(*pattern))
|
282
|
+
query(RDF::Statement.new(*pattern), &block)
|
283
283
|
when Hash
|
284
284
|
statements = []
|
285
285
|
reader = @adapter.query(self,pattern)
|
data/lib/rdf/do/version.rb
CHANGED
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 3
|
8
|
-
-
|
9
|
-
version: 0.3.
|
8
|
+
- 1
|
9
|
+
version: 0.3.1
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Ben Lavender
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-
|
17
|
+
date: 2010-06-09 00:00:00 +02:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|