Sha256: 78e450b9a5d9544dd9fcc5add60c2850e9e4758091cb4c5822e18858fc0b1295
Contents?: true
Size: 558 Bytes
Versions: 29
Compression:
Stored size: 558 Bytes
Contents
module ActiveFedora module RdfObject extend ActiveSupport::Concern included do include RdfNode attr_reader :rdf_subject, :graph end def graph @graph ||= RDF::Graph.new @graph end def initialize(graph, subject=nil) subject ||= RDF::Node.new @graph = graph @rdf_subject = subject insert_type_assertion end private def insert_type_assertion rdf_type = self.class.rdf_type @graph.insert([@rdf_subject, RDF.type, rdf_type]) if rdf_type end end end
Version data entries
29 entries across 29 versions & 1 rubygems