Sha256: b06f3477f8040ed0e4d4e4100bec1314c36a5ea0dcce7819e3523a795ea2c57b
Contents?: true
Size: 505 Bytes
Versions: 1
Compression:
Stored size: 505 Bytes
Contents
module ActiveFedora module RdfObject extend ActiveSupport::Concern included do include RdfNode attr_reader :rdf_subject, :graph end def initialize(graph = RDF::Graph.new, 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
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
active-fedora-7.0.0.rc2 | lib/active_fedora/rdf_object.rb |