Class: Dru::CLI
- Inherits:
-
Thor
- Object
- Thor
- Dru::CLI
- Defined in:
- lib/dru/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
- #attach ⇒ Object
- #down ⇒ Object
- #exec(*command) ⇒ Object
- #runner(*command) ⇒ Object
- #up ⇒ Object
- #version ⇒ Object
Instance Method Details
#attach ⇒ Object
38 39 40 41 42 43 44 45 |
# File 'lib/dru/cli.rb', line 38 def attach(*) if [:help] invoke :help, ['attach'] else require_relative 'commands/attach' Dru::Commands::Attach.new(options: ).execute end end |
#down ⇒ Object
24 25 26 27 28 29 30 31 |
# File 'lib/dru/cli.rb', line 24 def down(*) if [:help] invoke :help, ['down'] else require_relative 'commands/down' Dru::Commands::Down.new.execute end end |
#exec(*command) ⇒ Object
54 55 56 57 58 59 60 61 |
# File 'lib/dru/cli.rb', line 54 def exec(*command) if [:help] invoke :help, ['exec'] else require_relative 'commands/exec' Dru::Commands::Exec.new(command: command, options: ).execute end end |
#runner(*command) ⇒ Object
84 85 86 87 88 89 90 91 |
# File 'lib/dru/cli.rb', line 84 def runner(*command) if [:help] invoke :help, ['runner'] else require_relative 'commands/runner' Dru::Commands::Runner.new(command: command, options: ).execute end end |