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

Defined in:
vendor/bundler/ruby/3.3.0/bundler/gems/rdf-json-7d579de01769/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/3.3.0/bundler/gems/rdf-json-7d579de01769/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