Top Level Namespace
Defined Under Namespace
Modules: Dployr
Instance Method Summary collapse
Instance Method Details
#run(command, options, arg = nil) ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/dployr/cli.rb', line 8 def run(command, , arg = nil) begin cmd = Dployr::Commands.const_get command raise "Command not supported: #{command}" unless cmd if arg cmd.new , arg else cmd.new end rescue => e puts "Error: #{e}".red puts e.backtrace if e.backtrace and [:debug] exit 1 end end |