Class: AxTrack::Tracker::GPSPosition

Inherits:
Object
  • Object
show all
Defined in:
lib/ax_track/objects/tracker.rb

Instance Method Summary collapse

Methods inherited from Object

#create_getters

Constructor Details

#initialize(json_response) ⇒ GPSPosition

Returns a new instance of GPSPosition.



26
27
28
29
30
31
32
# File 'lib/ax_track/objects/tracker.rb', line 26

def initialize(json_response)
  @lat =       json_response['lat']
  @lng =       json_response['lng']
  @timestamp = DateTime.parse(json_response['timestamp'], false) if json_response['timestamp']

  create_getters
end