lib/redlander/model.rb in redlander-0.5.0 vs lib/redlander/model.rb in redlander-0.5.1
- old
+ new
@@ -97,12 +97,12 @@
# - [Array<Hash>] for SPARQL SELECT queries
# where hash values are Redlander::Node instances;
# if given a block, yields each binding hash to it
# - nil, if query fails
# @raise [RedlandError] if fails to create a query
- def query(q, options = {})
+ def query(q, options = {}, &block)
query = Query::Results.new(q, options)
- query.process(self)
+ query.process(self, &block)
end
# Merge statements from another model
# (duplicates and invalid statements are skipped)
#