Sha256: d4f692636d9c64357b4131fd63f99dceb344e02c56497f9282a4f27bf85941d2
Contents?: true
Size: 537 Bytes
Versions: 34
Compression:
Stored size: 537 Bytes
Contents
# frozen_string_literal: true ## # These patches are necessary for the postgres adapter to build JSON-LD versions # of RDF objects when `to_json` is called on them - that way they're stored in # the database as a standard format. module RDF class Literal def as_json(*_args) JSON::LD::API.fromRdf([RDF::Statement.new(RDF::URI(""), RDF::URI(""), self)])[0][""][0] end end class URI def as_json(*_args) JSON::LD::API.fromRdf([RDF::Statement.new(RDF::URI(""), RDF::URI(""), self)])[0][""][0] end end end
Version data entries
34 entries across 34 versions & 1 rubygems