Class: Rly::CLI
- Inherits:
-
Thor
- Object
- Thor
- Rly::CLI
- Defined in:
- lib/rly/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
- #add(name, url) ⇒ Object
- #list ⇒ Object
- #open(name) ⇒ Object (also: #o)
- #remove(name) ⇒ Object
- #version ⇒ Object
Instance Method Details
#add(name, url) ⇒ Object
52 53 54 55 56 57 58 59 |
# File 'lib/rly/cli.rb', line 52 def add(name, url) if [:help] invoke :help, ['add'] else require_relative 'commands/add' Rly::Commands::Add.new(name, url, ).execute end end |
#list ⇒ Object
38 39 40 41 42 43 44 45 |
# File 'lib/rly/cli.rb', line 38 def list(*) if [:help] invoke :help, ['list'] else require_relative 'commands/list' Rly::Commands::List.new().execute end end |
#open(name) ⇒ Object Also known as: o
24 25 26 27 28 29 30 31 |
# File 'lib/rly/cli.rb', line 24 def open(name) if [:help] invoke :help, ['open'] else require_relative 'commands/open' Rly::Commands::Open.new(name, ).execute end end |