Method: RDF::JSON::Reader#parse_node
- Defined in:
- lib/rdf/json/reader.rb
#parse_node(string) ⇒ RDF::Node Also known as: parse_bnode
Parses an RDF/JSON blank node string into an RDF::Node instance.
118 119 120 121 122 |
# File 'lib/rdf/json/reader.rb', line 118 def parse_node(string) @nodes ||= {} id = string[2..-1] # strips off the initial '_:' @nodes[id.to_sym] ||= RDF::Node.new(id) end |