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

Defined in:
vendor/bundler/ruby/2.4.0/bundler/gems/rdf-json-3f36e90af14f/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:



137
138
139
140
141
142
143
144
# File 'vendor/bundler/ruby/2.4.0/bundler/gems/rdf-json-3f36e90af14f/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