Class: OsUp::Cli::Command
- Inherits:
-
OsCtl::Lib::Cli::Command
- Object
- OsCtl::Lib::Cli::Command
- OsUp::Cli::Command
- Defined in:
- lib/osup/cli/command.rb
Class Method Summary collapse
Class Method Details
.run(klass, method) ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/osup/cli/command.rb', line 5 def self.run(klass, method) proc do |global_opts, opts, args| if global_opts[:debug] OsCtl::Lib::Logger.setup(:stdout) else OsCtl::Lib::Logger.setup(:none) end cmd = klass.new(global_opts, opts, args) cmd.method(method).call end end |