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

Instance Attribute Summary collapse

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

Instance Attribute Details

#propertiesObject

Returns the value of attribute properties.



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

def properties
  @properties
end

Class Method Details

.included(klass) ⇒ Object

:nodoc:



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

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

Instance Method Details

#add_metadataObject



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

def 
end

#create_property_getter(property) ⇒ Object

:nodoc:



112
113
114
115
116
117
118
119
# File 'lib/active_fedora/model.rb', line 112

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:



121
122
123
124
125
126
127
# File 'lib/active_fedora/model.rb', line 121

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

#datastreamObject



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

def datastream
end