Module: Onetime::CLI
- Defined in:
- lib/onetime/cli.rb,
lib/onetime/cli/parser.rb,
lib/onetime/cli/runner.rb
Defined Under Namespace
Class Method Summary collapse
Class Method Details
.run(argv, stdin: $stdin, stdout: $stdout, stderr: $stderr) ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/onetime/cli.rb', line 8 def self.run(argv, stdin: $stdin, stdout: $stdout, stderr: $stderr) parsed = Parser.parse(argv) Runner.new(parsed, stdin: stdin, stdout: stdout, stderr: stderr).run rescue Parser::Error, Runner::Error, RuntimeError => e stderr.puts e. 1 rescue StandardError => e stdout.puts e. stdout.puts e.backtrace 1 end |