Class: Valkyrie::Persistence::Solr::ModelConverter::CompositeSolrRow

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

Constructor Details

#initialize(solr_rows) ⇒ CompositeSolrRow

Returns a new instance of CompositeSolrRow.



116
117
118
# File 'lib/valkyrie/persistence/solr/model_converter.rb', line 116

def initialize(solr_rows)
  @solr_rows = solr_rows
end

Instance Attribute Details

#solr_rowsObject (readonly)

Returns the value of attribute solr_rows.



115
116
117
# File 'lib/valkyrie/persistence/solr/model_converter.rb', line 115

def solr_rows
  @solr_rows
end

Instance Method Details

#apply_to(hsh) ⇒ Object

See Also:

  • Valkyrie::Persistence::Solr::Mapper::SolrRow#apply_to


121
122
123
124
125
126
# File 'lib/valkyrie/persistence/solr/model_converter.rb', line 121

def apply_to(hsh)
  solr_rows.each do |solr_row|
    solr_row.apply_to(hsh)
  end
  hsh
end