Class: AxTrack::Tracker::GPSPosition
- Defined in:
- lib/ax_track/objects/tracker.rb
Instance Method Summary collapse
-
#initialize(json_response) ⇒ GPSPosition
constructor
A new instance of GPSPosition.
Methods inherited from Object
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 |