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.



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_sObject



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