Class: Valkyrie::Persistence::Solr::ModelConverter::EnumerableValue
- Inherits:
-
ValueMapper
- Object
- ValueMapper
- Valkyrie::Persistence::Solr::ModelConverter::EnumerableValue
- Defined in:
- lib/valkyrie/persistence/solr/model_converter.rb
Overview
Casts enumerable values one by one.
Instance Attribute Summary
Attributes inherited from ValueMapper
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from ValueMapper
Constructor Details
This class inherits a constructor from Valkyrie::ValueMapper
Class Method Details
.handles?(value) ⇒ Boolean
160 161 162 |
# File 'lib/valkyrie/persistence/solr/model_converter.rb', line 160 def self.handles?(value) value.is_a?(Property) && value.value.is_a?(Array) end |
Instance Method Details
#result ⇒ Object
164 165 166 167 168 169 170 |
# File 'lib/valkyrie/persistence/solr/model_converter.rb', line 164 def result CompositeSolrRow.new( value.value.map do |val| calling_mapper.for(Property.new(value.key, val, value.value)).result end ) end |