Class: AxTrack::Tracker::GPSPosition
- Defined in:
- lib/ax_track/objects/tracker/gps_position.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.
5 6 7 8 9 10 11 |
# File 'lib/ax_track/objects/tracker/gps_position.rb', line 5 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 |