Class: Parse::Query::WithinCondition
- Inherits:
-
Object
- Object
- Parse::Query::WithinCondition
- Defined in:
- lib/parse/query.rb
Instance Method Summary collapse
-
#initialize(southwest_geo_point, northeast_geo_point) ⇒ WithinCondition
constructor
A new instance of WithinCondition.
- #to_s ⇒ Object
Constructor Details
#initialize(southwest_geo_point, northeast_geo_point) ⇒ WithinCondition
Returns a new instance of WithinCondition.
354 355 356 357 |
# File 'lib/parse/query.rb', line 354 def initialize southwest_geo_point, northeast_geo_point @southwest_geo_point = southwest_geo_point @northeast_geo_point = northeast_geo_point end |
Instance Method Details
#to_s ⇒ Object
359 360 361 |
# File 'lib/parse/query.rb', line 359 def to_s %Q|{"$within":{"$box":[#{@southwest_geo_point.to_json},#{@northeast_geo_point.to_json}]}}| end |