lib/rdf/vocab/extensions.rb in rdf-vocab-3.1.10 vs lib/rdf/vocab/extensions.rb in rdf-vocab-3.1.11

- old
+ new

@@ -134,11 +134,11 @@ cats[key].each do |subject| po = {} # Group predicates with their values - graph.query(subject: subject) do |statement| + graph.query({subject: subject}) do |statement| # Sanity check this, as these are set to an empty string if not defined. next if [RDF::RDFS.label, RDF::RDFS.comment].include?(statement.predicate) && statement.object.to_s.empty? po[statement.predicate] ||= [] po[statement.predicate] << statement.object end @@ -260,11 +260,11 @@ cats[key].each do |subject| node = {"@id" => subject.pname} po = {} # Group predicates with their values - graph.query(subject: subject) do |statement| + graph.query({subject: subject}) do |statement| # Sanity check this, as these are set to an empty string if not defined. next if [RDF::RDFS.label, RDF::RDFS.comment].include?(statement.predicate) && statement.object.to_s.empty? po[statement.predicate] ||= [] po[statement.predicate] << statement.object end @@ -449,10 +449,10 @@ # @return [Hash{RDF::URI => Symbol}] def subject_categories(graph) cats = {} categorized = {} uncategorized = {} - graph.query(predicate: RDF.type) do |statement| + graph.query({predicate: RDF.type}) do |statement| # Only serialize statements that are in the defined vocabulary next unless statement.subject.uri? && statement.subject.start_with?(self.to_uri) case statement.object when RDF.Property, RDF::OWL.AnnotationProperty,