lib/rdf/rdfxml/patches/graph_properties.rb in rdf-rdfxml-0.3.8 vs lib/rdf/rdfxml/patches/graph_properties.rb in rdf-rdfxml-0.3.9
- old
+ new
@@ -3,15 +3,15 @@
# Resource properties
#
# Properties arranged as a hash with the predicate Term as index to an array of resources or literals
#
# Example:
- # graph.load(':foo a :bar; rdfs:label "An example" .', "http://example.com/")
- # graph.resources(URI.new("http://example.com/subject")) =>
- # {
- # "http://www.w3.org/1999/02/22-rdf-syntax-ns#type" => [<http://example.com/#bar>],
- # "http://example.com/#label" => ["An example"]
- # }
+ # graph.load(':foo a :bar; rdfs:label "An example" .', "http://example.com/")
+ # graph.resources(URI.new("http://example.com/subject")) =>
+ # {
+ # "http://www.w3.org/1999/02/22-rdf-syntax-ns#type" => \[<http://example.com/#bar>\],
+ # "http://example.com/#label" => \["An example"\]
+ # }
def properties(subject, recalc = false)
@properties ||= {}
@properties.delete(subject.to_s) if recalc
@properties[subject.to_s] ||= begin
hash = Hash.new
\ No newline at end of file