Class: ColumbusCli

Inherits:
Thor
  • Object
show all
Defined in:
lib/columbus_cli.rb

Defined Under Namespace

Classes: Track

Instance Method Summary collapse

Instance Method Details

#csv2gpx(csv_file) ⇒ Object



7
8
9
10
11
12
13
14
15
# File 'lib/columbus_cli.rb', line 7

def csv2gpx(csv_file)
  puts "Converting #{csv_file} to #{options[:output]}..."

  track = Track.new File.expand_path(csv_file)
  gpx = GPX::GPXFile.new tracks: [track.to_gpx]
  gpx.write(File.expand_path(options[:output]))

  puts "Conversion complete"
end