Class: Sunspot::Query::Restriction::InRadius
- Defined in:
- lib/sunspot/query/restriction.rb
Constant Summary
Constants inherited from Base
Instance Method Summary collapse
-
#initialize(negated, field, *value) ⇒ InRadius
constructor
A new instance of InRadius.
- #negate ⇒ Object
Methods inherited from Base
#negated?, #to_boolean_phrase, #to_negated_boolean_phrase, #to_params
Methods included from Filter
Constructor Details
#initialize(negated, field, *value) ⇒ InRadius
Returns a new instance of InRadius.
161 162 163 164 |
# File 'lib/sunspot/query/restriction.rb', line 161 def initialize(negated, field, *value) @lat, @lon, @radius = value super negated, field, value end |
Instance Method Details
#negate ⇒ Object
166 167 168 |
# File 'lib/sunspot/query/restriction.rb', line 166 def negate self.class.new(!@negated, @field, *@value) end |