Class: WorldTides::CLI
- Inherits:
-
Thor
- Object
- Thor
- WorldTides::CLI
- Defined in:
- lib/world_tides/cli.rb
Overview
Handle the application command line parsing and the dispatch to various command objects
Constant Summary collapse
- Error =
Error raised by this runner
Class.new(StandardError)
Instance Method Summary collapse
Instance Method Details
#fetch(filename, lon, lat) ⇒ Object
24 25 26 27 28 29 30 31 |
# File 'lib/world_tides/cli.rb', line 24 def fetch(filename, lon, lat) if [:help] invoke :help, ['fetch'] else require_relative 'commands/fetch' WorldTides::Commands::Fetch.new(filename, lon, lat, ).execute end end |
#version ⇒ Object
15 16 17 18 |
# File 'lib/world_tides/cli.rb', line 15 def version require_relative 'version' puts "v#{WorldTides::VERSION}" end |