Sha256: eb3cc5d0e6803a4475e39cd5d126becbdaa96578b6aec0e7af131fd9829679cc
Contents?: true
Size: 866 Bytes
Versions: 16
Compression:
Stored size: 866 Bytes
Contents
require 'solrizer/field_name_mapper' module ActiveFedora::MetadataDatastreamHelper extend Deprecation self.deprecation_horizon = 'active-fedora 6.0' 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 deprecation_deprecate :ensure_xml_loaded def serialize! # :nodoc: if changed? return unless xml_loaded or new? self.content = self.to_xml end end deprecation_deprecate :serialize! end
Version data entries
16 entries across 16 versions & 1 rubygems