Class: Consist::Commands::Exec
- Inherits:
-
Object
- Object
- Consist::Commands::Exec
- Includes:
- Erbable
- Defined in:
- lib/consist/commands/exec.rb
Instance Method Summary collapse
-
#initialize(command) ⇒ Exec
constructor
A new instance of Exec.
- #perform!(executor) ⇒ Object
Methods included from Erbable
Constructor Details
#initialize(command) ⇒ Exec
Returns a new instance of Exec.
8 9 10 |
# File 'lib/consist/commands/exec.rb', line 8 def initialize(command) @command = command end |
Instance Method Details
#perform!(executor) ⇒ Object
12 13 14 15 16 17 |
# File 'lib/consist/commands/exec.rb', line 12 def perform!(executor) @command[:commands].each do executor.execute(erb_template(_1), interaction_handler: Consist::Commands::StreamLogger.new, **@command[:params]) end end |