Method: RDF::NTriples::Writer#format_node

Defined in:
lib/rdf/ntriples/writer.rb

#format_node(node, unique_bnodes: false, **options) ⇒ String

Returns the N-Triples representation of a blank node.

Parameters:

  • node (RDF::Node)
  • unique_bnodes (Boolean) (defaults to: false)

    (false) Serialize node using unique identifier, rather than any used to create the node.

  • options (Hash{Symbol => Object})

    ({})

Returns:



244
245
246
# File 'lib/rdf/ntriples/writer.rb', line 244

def format_node(node, unique_bnodes: false, **options)
  unique_bnodes ? node.to_unique_base : node.to_s
end