Class: TF1Converter::GpxFile
- Inherits:
-
Object
- Object
- TF1Converter::GpxFile
- Defined in:
- lib/tf1_converter/gpx_file.rb
Instance Method Summary collapse
-
#initialize(gpx_file) ⇒ GpxFile
constructor
A new instance of GpxFile.
- #tracks ⇒ Object
- #waypoints ⇒ Object
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
#tracks ⇒ Object
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 |
#waypoints ⇒ Object
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 |