Class: TcxRb::Trackpoint

Inherits:
Object
  • Object
show all
Defined in:
lib/tcx_rb/trackpoint.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#altitudeObject

Returns the value of attribute altitude.



15
16
17
# File 'lib/tcx_rb/trackpoint.rb', line 15

def altitude
  @altitude
end

#distanceObject

Returns the value of attribute distance.



15
16
17
# File 'lib/tcx_rb/trackpoint.rb', line 15

def distance
  @distance
end

#heart_rateObject

Returns the value of attribute heart_rate.



15
16
17
# File 'lib/tcx_rb/trackpoint.rb', line 15

def heart_rate
  @heart_rate
end

#latitudeObject 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

#longitudeObject 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

#timeObject

Returns the value of attribute time.



15
16
17
# File 'lib/tcx_rb/trackpoint.rb', line 15

def time
  @time
end