Class: Leftovers::CLI
- Inherits:
-
Object
- Object
- Leftovers::CLI
- Defined in:
- lib/leftovers/cli.rb
Instance Method Summary collapse
-
#initialize(argv: []) ⇒ CLI
constructor
A new instance of CLI.
- #run ⇒ Object
Constructor Details
#initialize(argv: []) ⇒ CLI
Returns a new instance of CLI.
7 8 9 |
# File 'lib/leftovers/cli.rb', line 7 def initialize(argv: []) @argv = argv end |
Instance Method Details
#run ⇒ Object
11 12 13 14 15 16 17 18 19 20 |
# File 'lib/leftovers/cli.rb', line 11 def run runner.run rescue ::Leftovers::Error => e Leftovers.warn("\e[31m#{e.class}: #{e.message}\e[0m\n\n#{e.backtrace.join("\n")}") 1 rescue ::Leftovers::Exit => e e.status # what why? end |