Class: Valkyrie::Persistence::Fedora::Persister::OrmConverter::GraphToAttributes::CompositeApplicator
- Inherits:
-
Object
- Object
- Valkyrie::Persistence::Fedora::Persister::OrmConverter::GraphToAttributes::CompositeApplicator
- Defined in:
- lib/valkyrie/persistence/fedora/persister/orm_converter.rb
Overview
Class for handling Arrays of Properties
Instance Attribute Summary collapse
-
#applicators ⇒ Object
readonly
Returns the value of attribute applicators.
Instance Method Summary collapse
-
#apply_to(hsh) ⇒ Hash
Enumerate through the Applicator constructed for each Property updating the Valkyrie resource attribute Hash with each result.
-
#initialize(applicators) ⇒ CompositeApplicator
constructor
A new instance of CompositeApplicator.
Constructor Details
#initialize(applicators) ⇒ CompositeApplicator
Returns a new instance of CompositeApplicator.
140 141 142 |
# File 'lib/valkyrie/persistence/fedora/persister/orm_converter.rb', line 140 def initialize(applicators) @applicators = applicators end |
Instance Attribute Details
#applicators ⇒ Object (readonly)
Returns the value of attribute applicators.
137 138 139 |
# File 'lib/valkyrie/persistence/fedora/persister/orm_converter.rb', line 137 def applicators @applicators end |
Instance Method Details
#apply_to(hsh) ⇒ Hash
Enumerate through the Applicator constructed for each Property
updating the Valkyrie resource attribute Hash with each result
148 149 150 151 152 153 |
# File 'lib/valkyrie/persistence/fedora/persister/orm_converter.rb', line 148 def apply_to(hsh) applicators.each do |applicator| applicator.apply_to(hsh) end hsh end |