lib/json/ld/extensions.rb in json-ld-1.1.7 vs lib/json/ld/extensions.rb in json-ld-1.1.8
- old
+ new
@@ -14,11 +14,11 @@
def properties(subject, recalc = false)
@properties ||= {}
@properties.delete(subject.to_s) if recalc
@properties[subject.to_s] ||= begin
hash = Hash.new
- self.query(:subject => subject) do |statement|
+ self.query(subject: subject) do |statement|
pred = statement.predicate.to_s
hash[pred] ||= []
hash[pred] << statement.object
end
@@ -26,10 +26,10 @@
end
end
# Get type(s) of subject, returns a list of symbols
def type_of(subject)
- query(:subject => subject, :predicate => RDF.type).map {|st| st.object}
+ query(subject: subject, predicate: RDF.type).map {|st| st.object}
end
end
class Node
# Odd case of appending to a BNode identifier