Module: ActiveFedora::Model

Extended by:
FedoraObject
Included in:
Base
Defined in:
lib/active_fedora/model.rb

Overview

ActiveFedora

This module mixes various methods into the including class, much in the way ActiveRecord does.

Defined Under Namespace

Modules: ClassMethods

Class Method Summary collapse

Instance Method Summary collapse

Methods included from FedoraObject

add_datastream, datastreams, datastreams_xml, dc, delete, errors, initialize, inner_object, owner_id, pid, rels_ext, save, state

Class Method Details

.included(klass) ⇒ Object

:nodoc:



13
14
15
# File 'lib/active_fedora/model.rb', line 13

def self.included(klass) # :nodoc:
  klass.extend(ClassMethods)
end

Instance Method Details

#add_metadataObject



17
18
# File 'lib/active_fedora/model.rb', line 17

def 
end

#create_property_getter(property) ⇒ Object

:nodoc:



227
228
229
230
231
232
233
234
# File 'lib/active_fedora/model.rb', line 227

def create_property_getter(property) # :nodoc:

  class_eval <<-END
      def #{property.name}
        attribute_get("#{property.name}")
      end
      END
end

#create_property_setter(property) ⇒ Object

:nodoc:



236
237
238
239
240
241
242
# File 'lib/active_fedora/model.rb', line 236

def create_property_setter(property)# :nodoc:
  class_eval <<-END
      def #{property.name}=(value)
        attribute_set("#{property.name}", value)
      end
      END
end

#datastreamObject



20
21
# File 'lib/active_fedora/model.rb', line 20

def datastream
end