Class: Sunspot::DataExtractor::Constant
- Inherits:
-
Object
- Object
- Sunspot::DataExtractor::Constant
- Defined in:
- lib/sunspot/data_extractor.rb
Overview
Constant data extractors simply return the same value for every object.
Instance Method Summary collapse
-
#initialize(value) ⇒ Constant
constructor
A new instance of Constant.
- #value_for(object) ⇒ Object
Constructor Details
#initialize(value) ⇒ Constant
Returns a new instance of Constant.
41 42 43 |
# File 'lib/sunspot/data_extractor.rb', line 41 def initialize(value) @value = value end |
Instance Method Details
#value_for(object) ⇒ Object
45 46 47 |
# File 'lib/sunspot/data_extractor.rb', line 45 def value_for(object) @value end |