Class: CLI::Kit::Executor

Inherits:
Object
  • Object
show all
Defined in:
lib/cli/kit/executor.rb

Instance Method Summary collapse

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