Class: CLI::Kit::Executor
- Inherits:
-
Object
- Object
- CLI::Kit::Executor
- Defined in:
- lib/cli/kit/executor.rb
Instance Method Summary collapse
- #call(command, command_name, args) ⇒ Object
-
#initialize(log_file:) ⇒ Executor
constructor
A new instance of Executor.
Constructor Details
#initialize(log_file:) ⇒ Executor
Returns a new instance of Executor.
7 8 9 |
# File 'lib/cli/kit/executor.rb', line 7 def initialize(log_file:) @log_file = log_file end |
Instance Method Details
#call(command, command_name, args) ⇒ Object
11 12 13 |
# File 'lib/cli/kit/executor.rb', line 11 def call(command, command_name, args) with_traps { with_logging { command.call(args, command_name) } } end |