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.
141 142 143 |
# File 'lib/valkyrie/persistence/fedora/persister/orm_converter.rb', line 141 def initialize(applicators) @applicators = applicators end |
Instance Attribute Details
#applicators ⇒ Object (readonly)
Returns the value of attribute applicators.
138 139 140 |
# File 'lib/valkyrie/persistence/fedora/persister/orm_converter.rb', line 138 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
149 150 151 152 153 154 |
# File 'lib/valkyrie/persistence/fedora/persister/orm_converter.rb', line 149 def apply_to(hsh) applicators.each do |applicator| applicator.apply_to(hsh) end hsh end |