Module: GpxTrackGenerator::Api
- Defined in:
- lib/gpx_track_generator/api.rb
Overview
Main api
Class Method Summary collapse
Class Method Details
.generate(input_files:, track_name:, output_file:, reverse: false, single_segment: false) ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 |
# File 'lib/gpx_track_generator/api.rb', line 5 def self.generate(input_files:, track_name:, output_file:, reverse: false, single_segment: false) files = input_files.map { |f| GpxFile.new(File.(f)) } track = Track.new( files, name: track_name, reverse: reverse, single_segment: single_segment ) File.write(output_file, track.to_s) end |