Class: Sunspot::FieldFactory::Abstract
- Inherits:
-
Object
- Object
- Sunspot::FieldFactory::Abstract
- Defined in:
- sunspot/lib/sunspot/field_factory.rb
Overview
Base class for field factories.
Instance Attribute Summary (collapse)
-
- (Object) name
readonly
Returns the value of attribute name.
Instance Method Summary (collapse)
-
- (Abstract) initialize(name, options = {}, &block)
constructor
A new instance of Abstract.
Constructor Details
- (Abstract) initialize(name, options = {}, &block)
A new instance of Abstract
16 17 18 19 20 21 22 23 24 |
# File 'sunspot/lib/sunspot/field_factory.rb', line 16 def initialize(name, = {}, &block) @name = name.to_sym @data_extractor = if block DataExtractor::BlockExtractor.new(&block) else DataExtractor::AttributeExtractor.new(.delete(:using) || name) end end |
Instance Attribute Details
- (Object) name (readonly)
Returns the value of attribute name
14 15 16 |
# File 'sunspot/lib/sunspot/field_factory.rb', line 14 def name @name end |