Module: RDF::JSON::Extensions::Statement

Defined in:
lib/rdf/json/extensions.rb

Overview

RDF/JSON extensions for RDF::Statement.

Instance Method Summary (collapse)

Instance Method Details

- (Hash) to_rdf_json

Returns the RDF/JSON representation of this statement.

Returns:

  • (Hash)


106
107
108
# File 'lib/rdf/json/extensions.rb', line 106

def to_rdf_json
  {subject.to_s => {predicate.to_s => [object.to_rdf_json]}}
end