Class: Sunspot::DataExtractor::Constant
- Inherits:
-
AbstractExtractor
- Object
- AbstractExtractor
- Sunspot::DataExtractor::Constant
- Defined in:
- lib/sunspot/data_extractor.rb
Overview
Constant data extractors simply return the same value for every object.
Constant Summary
Constants inherited from AbstractExtractor
AbstractExtractor::BLACKLIST_REGEXP
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.
71 72 73 |
# File 'lib/sunspot/data_extractor.rb', line 71 def initialize(value) @value = value end |
Instance Method Details
#value_for(object) ⇒ Object
75 76 77 |
# File 'lib/sunspot/data_extractor.rb', line 75 def value_for(object) super @value end |