Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

19 lines (15 sloc) 0.407 kb
class ParseGeoPoint
attr_accessor :latitude, :longitude
def initialize(hash=nil)
if hash.nil?
self.latitude=0.0
self.longitude=0.0
else
self.latitude = hash["latitude"] || hash[:latitude]
self.longitude = hash["longitude"] || hash[:longitude]
end
end
def to_pointer
{"__type"=>"GeoPoint", :latitude=> self.latitude, :longitude => self.longitude}
end
end
Jump to Line
Something went wrong with that request. Please try again.