Skip to content

Commit 743eee6

Browse files
author
Thomas Johnson
authored
Merge pull request #366 from ruby-rdf/feature/dataset-each
Change `Dataset#each_statement` to `Dataset#each`
2 parents da525ad + e03a94d commit 743eee6

1 file changed

Lines changed: 8 additions & 14 deletions

File tree

lib/rdf/model/dataset.rb

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -61,24 +61,18 @@ def durable?
6161

6262
##
6363
# @private
64-
# @see RDF::Enumerable#each_statement
65-
def each_statement
66-
if block_given?
67-
@statements.each do |st|
68-
if st.graph_name.equal?(DEFAULT_GRAPH)
69-
st = st.dup
70-
st.graph_name = nil
71-
end
72-
73-
yield st
64+
# @see RDF::Enumerable#each
65+
def each
66+
@statements.each do |st|
67+
if st.graph_name.equal?(DEFAULT_GRAPH)
68+
st = st.dup
69+
st.graph_name = nil
7470
end
7571

76-
self
72+
yield st
7773
end
78-
79-
enum_statement
74+
self
8075
end
81-
alias_method :each, :each_statement
8276

8377
##
8478
# Returns a developer-friendly representation of this object.

0 commit comments

Comments
 (0)