Class: Parse::Query::WithinCondition

Inherits:
Object
  • Object
show all
Defined in:
lib/parse/query.rb

Instance Method Summary collapse

Constructor Details

#initialize(southwest_geo_point, northeast_geo_point) ⇒ WithinCondition

Returns a new instance of WithinCondition.



341
342
343
344
# File 'lib/parse/query.rb', line 341

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_sObject



346
347
348
# File 'lib/parse/query.rb', line 346

def to_s
  %Q|{"$within":{"$box":[#{@southwest_geo_point.to_json},#{@northeast_geo_point.to_json}]}}|
end