class CurrentLocation

Public Class Methods

new() click to toggle source
# File lib/response/location/CurrentLocation.rb, line 4
def initialize
  @latitude=0.0
  @longitude=0.0
  @altitude=0.0
  @accuracy=0.0
  @timestamp=nil
end

Public Instance Methods

getAccuracy() click to toggle source
# File lib/response/location/CurrentLocation.rb, line 59
def getAccuracy
  @accuracy
end
getAltitude() click to toggle source
# File lib/response/location/CurrentLocation.rb, line 51
def getAltitude
  @altitude
end
getLatitude() click to toggle source
# File lib/response/location/CurrentLocation.rb, line 35
def getLatitude
  @latitude
end
getLongitude() click to toggle source
# File lib/response/location/CurrentLocation.rb, line 43
def getLongitude
  @longitude
end
getTimestamp() click to toggle source
# File lib/response/location/CurrentLocation.rb, line 67
def getTimestamp
  @timestamp
end
initializeJSON(jsondict) click to toggle source
# File lib/response/location/CurrentLocation.rb, line 12
def initializeJSON(jsondict)
  @latitude=0.0
  if (jsondict!=nil) && (jsondict.has_key?'latitude') && (jsondict['latitude']!=nil)
    @latitude=jsondict['latitude'].to_f
  end
  @longitude=0.0
  if (jsondict!=nil) && (jsondict.has_key?'longitude') && (jsondict['longitude']!=nil)
    @longitude=jsondict['longitude'].to_f
  end
  @altitude=0.0
  if (jsondict!=nil) && (jsondict.has_key?'altitude') && (jsondict['altitude']!=nil)
    @altitude=jsondict['altitude'].to_f
  end
  @accuracy=0.0
  if (jsondict!=nil) && (jsondict.has_key?'accuracy') && (jsondict['accuracy']!=nil)
    @accuracy=jsondict['accuracy'].to_f
  end
  @timestamp=nil
  if (jsondict!=nil) && (jsondict.has_key?'timestamp') && (jsondict['timestamp']!=nil)
    @timestamp=jsondict['timestamp']
  end
end
setAccuracy(accuracy) click to toggle source
# File lib/response/location/CurrentLocation.rb, line 63
def setAccuracy(accuracy)
  @accuracy=accuracy
end
setAltitude(altitude) click to toggle source
# File lib/response/location/CurrentLocation.rb, line 55
def setAltitude(altitude)
  @altitude=altitude
end
setLatitude(latitude) click to toggle source
# File lib/response/location/CurrentLocation.rb, line 39
def setLatitude(latitude)
  @latitude=latitude
end
setLongitude(longitude) click to toggle source
# File lib/response/location/CurrentLocation.rb, line 47
def setLongitude(longitude)
  @longitude=longitude
end
setTimestamp(timestamp) click to toggle source
# File lib/response/location/CurrentLocation.rb, line 71
def setTimestamp(timestamp)
  @timestamp=timestamp
end