Class: Sunspot::JoinField
Overview
:nodoc:
Instance Attribute Summary
Attributes inherited from Field
#boost, #indexed_name, #name, #reference, #type
Instance Method Summary collapse
-
#initialize(name, type, options = {}) ⇒ JoinField
constructor
A new instance of JoinField.
- #local_params ⇒ Object
Methods inherited from Field
#cast, #eql?, #hash, #more_like_this?, #multiple?, #to_indexed
Constructor Details
#initialize(name, type, options = {}) ⇒ JoinField
Returns a new instance of JoinField.
164 165 166 167 168 169 |
# File 'lib/sunspot/field.rb', line 164 def initialize(name, type, = {}) @multiple = !!.delete(:multiple) super(name, type, ) @join_string = .delete(:join_string) raise ArgumentError, "Unknown field option #{.keys.first.inspect} provided for field #{name.inspect}" unless .empty? end |
Instance Method Details
#local_params ⇒ Object
171 172 173 |
# File 'lib/sunspot/field.rb', line 171 def local_params "{!join #{@join_string}}" end |