Class: Valkyrie::Persistence::Solr::ModelConverter::CompositeSolrRow
- Inherits:
-
Object
- Object
- Valkyrie::Persistence::Solr::ModelConverter::CompositeSolrRow
- Defined in:
- lib/valkyrie/persistence/solr/model_converter.rb
Overview
Wraps up multiple SolrRows to apply them all at once, while looking like just one.
Instance Attribute Summary collapse
-
#solr_rows ⇒ Object
readonly
Returns the value of attribute solr_rows.
Instance Method Summary collapse
-
#apply_to(hsh) ⇒ Object
Merge a Hash of attribute values into a logical row of Solr fields.
-
#initialize(solr_rows) ⇒ CompositeSolrRow
constructor
A new instance of CompositeSolrRow.
Constructor Details
#initialize(solr_rows) ⇒ CompositeSolrRow
Returns a new instance of CompositeSolrRow.
189 190 191 |
# File 'lib/valkyrie/persistence/solr/model_converter.rb', line 189 def initialize(solr_rows) @solr_rows = solr_rows end |
Instance Attribute Details
#solr_rows ⇒ Object (readonly)
Returns the value of attribute solr_rows.
186 187 188 |
# File 'lib/valkyrie/persistence/solr/model_converter.rb', line 186 def solr_rows @solr_rows end |
Instance Method Details
#apply_to(hsh) ⇒ Object
Merge a Hash of attribute values into a logical row of Solr fields
196 197 198 199 200 201 |
# File 'lib/valkyrie/persistence/solr/model_converter.rb', line 196 def apply_to(hsh) solr_rows.each do |solr_row| solr_row.apply_to(hsh) end hsh end |