lib/rdf/trig/reader.rb in rdf-trig-1.1.5.1 vs lib/rdf/trig/reader.rb in rdf-trig-1.99.0

- old
+ new

@@ -63,15 +63,15 @@ end ## # Iterates the given block for each RDF quad in the input. # - # @yield [subject, predicate, object, context] + # @yield [subject, predicate, object, graph_name] # @yieldparam [RDF::Resource] subject # @yieldparam [RDF::URI] predicate # @yieldparam [RDF::Value] object - # @yieldparam [RDF::URI] context + # @yieldparam [RDF::URI] graph_name # @return [void] def each_quad(&block) if block_given? each_statement do |statement| block.call(*statement.to_quad) @@ -86,10 +86,10 @@ # @param [RDF::Statement] statement the subject of the statement # @return [RDF::Statement] Added statement # @raise [RDF::ReaderError] Checks parameter types and raises if they are incorrect if parsing mode is _validate_. def add_statement(production, statement) error("Statement is invalid: #{statement.inspect.inspect}", production: produciton) if validate? && statement.invalid? - statement.context = @graph_name if @graph_name + statement.graph_name = @graph_name if @graph_name @callback.call(statement) if statement.subject && statement.predicate && statement.object && (validate? ? statement.valid? : true) end