Class: TF1Converter::GpxFile

Inherits:
Object
  • Object
show all
Defined in:
lib/tf1_converter/gpx_file.rb

Instance Method Summary collapse

Constructor Details

#initialize(gpx_file) ⇒ GpxFile

Returns a new instance of GpxFile.



6
7
8
# File 'lib/tf1_converter/gpx_file.rb', line 6

def initialize(gpx_file)
  @gpx = gpx_file
end

Instance Method Details

#tracksObject



14
15
16
# File 'lib/tf1_converter/gpx_file.rb', line 14

def tracks
  @gpx.xpath('//gpx/trk').map{ |node| Gpx::Track.new(node) }
end

#waypointsObject



10
11
12
# File 'lib/tf1_converter/gpx_file.rb', line 10

def waypoints
  @gpx.xpath('//gpx/wpt').map{ |node| Gpx::Waypoint.new(node) }
end