Class: Valkyrie::Persistence::Solr::ORMConverter::IntegerValue
- Inherits:
-
ValueMapper
- Object
- ValueMapper
- Valkyrie::Persistence::Solr::ORMConverter::IntegerValue
- Defined in:
- lib/valkyrie/persistence/solr/orm_converter.rb
Overview
Converts an integer in solr into an Integer
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
251 252 253 |
# File 'lib/valkyrie/persistence/solr/orm_converter.rb', line 251 def self.handles?(value) value.to_s.start_with?("integer-") end |
Instance Method Details
#result ⇒ Object
255 256 257 |
# File 'lib/valkyrie/persistence/solr/orm_converter.rb', line 255 def result value.sub(/^integer-/, '').to_i end |