Sha256: 49c04675f2873f0f5f3604ed5e9f4caf893261465ddff1a7c0219188d62d9b8f
Contents?: true
Size: 796 Bytes
Versions: 41
Compression:
Stored size: 796 Bytes
Contents
require 'solrizer/field_name_mapper' #this class represents a MetadataDatastream, a special case of ActiveFedora::Datastream module ActiveFedora::MetadataDatastreamHelper attr_accessor :fields, :xml_loaded module ClassMethods #get the Class's field list def fields @@classFields end end def self.included(klass) klass.extend(ClassMethods) klass.send(:include, Solrizer::FieldNameMapper) end def ensure_xml_loaded return if xml_loaded self.xml_loaded = true if new? ## Load up the template self.class.from_xml nil, self else self.class.from_xml content, self end end def serialize! # :nodoc: if dirty? return unless xml_loaded self.content = self.to_xml end end end
Version data entries
41 entries across 41 versions & 1 rubygems