Class: TCXReader::Track

Inherits:
Object
  • Object
show all
Defined in:
lib/tcx_reader/track.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(trk) ⇒ Track

Returns a new instance of Track.



27
28
29
30
31
32
33
# File 'lib/tcx_reader/track.rb', line 27

def initialize(trk)
  @points = []
  trk.css("Trackpoint").each do |pt|
    point   = Point.new(pt)
    @points << point
  end
end

Instance Attribute Details

#pointsObject

Returns the value of attribute points.



25
26
27
# File 'lib/tcx_reader/track.rb', line 25

def points
  @points
end