Class: TcxRb::Trackpoint
- Inherits:
-
Object
- Object
- TcxRb::Trackpoint
- Defined in:
- lib/tcx_rb/trackpoint.rb
Instance Attribute Summary collapse
-
#altitude ⇒ Object
Returns the value of attribute altitude.
-
#distance ⇒ Object
Returns the value of attribute distance.
-
#heart_rate ⇒ Object
Returns the value of attribute heart_rate.
-
#latitude ⇒ Object
(also: #lat)
Returns the value of attribute latitude.
-
#longitude ⇒ Object
(also: #lon)
Returns the value of attribute longitude.
-
#time ⇒ Object
Returns the value of attribute time.
Instance Method Summary collapse
-
#initialize(args = {}) ⇒ Trackpoint
constructor
A new instance of Trackpoint.
Constructor Details
#initialize(args = {}) ⇒ Trackpoint
Returns a new instance of Trackpoint.
7 8 9 10 11 12 13 14 |
# File 'lib/tcx_rb/trackpoint.rb', line 7 def initialize(args = {}) @time = args[:time].to_s @latitude = args[:latitude].to_f @longitude = args[:longitude].to_f @altitude = args[:altitude].to_f @distance = args[:distance].to_f @heart_rate = args[:heart_rate].to_i end |
Instance Attribute Details
#altitude ⇒ Object
Returns the value of attribute altitude.
15 16 17 |
# File 'lib/tcx_rb/trackpoint.rb', line 15 def altitude @altitude end |
#distance ⇒ Object
Returns the value of attribute distance.
15 16 17 |
# File 'lib/tcx_rb/trackpoint.rb', line 15 def distance @distance end |
#heart_rate ⇒ Object
Returns the value of attribute heart_rate.
15 16 17 |
# File 'lib/tcx_rb/trackpoint.rb', line 15 def heart_rate @heart_rate end |
#latitude ⇒ Object Also known as: lat
Returns the value of attribute latitude.
15 16 17 |
# File 'lib/tcx_rb/trackpoint.rb', line 15 def latitude @latitude end |
#longitude ⇒ Object Also known as: lon
Returns the value of attribute longitude.
15 16 17 |
# File 'lib/tcx_rb/trackpoint.rb', line 15 def longitude @longitude end |
#time ⇒ Object
Returns the value of attribute time.
15 16 17 |
# File 'lib/tcx_rb/trackpoint.rb', line 15 def time @time end |