Module: ActiveFedora::Model
- Extended by:
- FedoraObject
- 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
-
.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
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_metadata ⇒ Object
17 18 |
# File 'lib/active_fedora/model.rb', line 17 def end |
#create_property_getter(property) ⇒ Object
:nodoc:
229 230 231 232 233 234 235 236 |
# File 'lib/active_fedora/model.rb', line 229 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:
238 239 240 241 242 243 244 |
# File 'lib/active_fedora/model.rb', line 238 def create_property_setter(property)# :nodoc: class_eval <<-END def #{property.name}=(value) attribute_set("#{property.name}", value) end END end |
#datastream ⇒ Object
20 21 |
# File 'lib/active_fedora/model.rb', line 20 def datastream end |