Module: RDF::JSON::Extensions::Transaction

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

Overview

RDF/JSON extensions for RDF::Transaction.

Instance Method Summary collapse

Instance Method Details

#to_rdf_jsonHash

Returns the serialized RDF/JSON representation of this object.

Returns:

  • (Hash)


137
138
139
140
141
142
143
144
# File 'lib/rdf/json/extensions.rb', line 137

def to_rdf_json
  json = options.dup.to_hash rescue {}
  json.merge!({
    :graph  => graph ? graph.to_uri.to_s : nil,
    :delete => deletes.to_rdf_json,
    :insert => inserts.to_rdf_json,
  })
end