Class: Sunspot::Field::VirtualField
Overview
VirtualFields extract data by evaluating the provided block in the context of the model instance.
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(name, type, options = {}, &block) ⇒ VirtualField
constructor
A new instance of VirtualField.
Methods inherited from Base
#cast, #indexed_name, #multiple?, #pair_for, #to_indexed
Constructor Details
#initialize(name, type, options = {}, &block) ⇒ VirtualField
Returns a new instance of VirtualField.
137 138 139 140 |
# File 'lib/sunspot/field.rb', line 137 def initialize(name, type, = {}, &block) super(name, type, ) @block = block end |