Class: Valkyrie::Persistence::Solr::ORMConverter::PropertyValue

Inherits:
ValueMapper
  • Object
show all
Defined in:
lib/valkyrie/persistence/solr/orm_converter.rb

Overview

Class for handling general string-serialized values in Solr fields

Instance Attribute Summary

Attributes inherited from ValueMapper

#calling_mapper, #value

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from ValueMapper

for, #initialize, register

Constructor Details

This class inherits a constructor from Valkyrie::ValueMapper

Class Method Details

.handles?(value) ⇒ Boolean

Determines whether or not an Object is a Property

Parameters:

  • value (Object)

Returns:

  • (Boolean)


185
186
187
# File 'lib/valkyrie/persistence/solr/orm_converter.rb', line 185

def self.handles?(value)
  value.is_a?(Property)
end

Instance Method Details

#resultString

Constructs an EnumerableValue and accesses the String value

Returns:

  • (String)


191
192
193
# File 'lib/valkyrie/persistence/solr/orm_converter.rb', line 191

def result
  calling_mapper.for(value.value).result
end