Class: Sunspot::Query::Restriction::InBoundingBox
- Defined in:
- lib/sunspot/query/restriction.rb
Constant Summary
Constants inherited from Base
Instance Method Summary collapse
-
#initialize(negated, field, first_corner, second_corner) ⇒ InBoundingBox
constructor
A new instance of InBoundingBox.
- #to_solr_conditional ⇒ Object
Methods inherited from Base
#negate, #negated?, #to_boolean_phrase, #to_negated_boolean_phrase, #to_params, #to_positive_boolean_phrase
Methods included from Filter
Constructor Details
#initialize(negated, field, first_corner, second_corner) ⇒ InBoundingBox
Returns a new instance of InBoundingBox.
177 178 179 180 |
# File 'lib/sunspot/query/restriction.rb', line 177 def initialize(negated, field, first_corner, second_corner) @bbox = Sunspot::Query::Bbox.new(field, first_corner, second_corner) super negated, field, [first_corner, second_corner] end |
Instance Method Details
#to_solr_conditional ⇒ Object
182 183 184 |
# File 'lib/sunspot/query/restriction.rb', line 182 def to_solr_conditional @bbox.to_solr_conditional end |