Module: ActiveFedora::Model
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
-
#properties ⇒ Object
Returns the value of attribute properties.
Class Method Summary collapse
-
.included(klass) ⇒ Object
:nodoc:.
Instance Method Summary collapse
- #add_metadata ⇒ Object
-
#create_property_getter(property) ⇒ Object
:nodoc:.
-
#create_property_setter(property) ⇒ Object
:nodoc:.
- #datastream ⇒ Object
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
#properties ⇒ Object
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_metadata ⇒ Object
18 19 |
# File 'lib/active_fedora/model.rb', line 18 def end |
#create_property_getter(property) ⇒ Object
:nodoc:
225 226 227 228 229 230 231 232 |
# File 'lib/active_fedora/model.rb', line 225 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:
234 235 236 237 238 239 240 |
# File 'lib/active_fedora/model.rb', line 234 def create_property_setter(property)# :nodoc: class_eval <<-END def #{property.name}=(value) attribute_set("#{property.name}", value) end END end |
#datastream ⇒ Object
21 22 |
# File 'lib/active_fedora/model.rb', line 21 def datastream end |