class ParseGeoPoint

Attributes

latitude[RW]
longitude[RW]

Public Class Methods

new(hash=nil) click to toggle source
# File lib/parse_resource/types/parse_geopoint.rb, line 4
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

Public Instance Methods

to_pointer() click to toggle source
# File lib/parse_resource/types/parse_geopoint.rb, line 15
def to_pointer
  {"__type"=>"GeoPoint", :latitude=> self.latitude, :longitude => self.longitude}
end