Class: Expectacle::Thrower
- Inherits:
-
ThrowerBase
- Object
- ThrowerBase
- Expectacle::Thrower
- Defined in:
- lib/expectacle/thrower.rb
Overview
Thrower logic(command list operation)
Instance Attribute Summary
Attributes inherited from ThrowerBase
Instance Method Summary collapse
-
#preview_parameter(hosts, commands) ⇒ Object
Preview all parameters for all hosts.
-
#run_command_for_all_hosts(hosts, commands) ⇒ Object
Run(exec) commands for all hosts.
Methods inherited from ThrowerBase
#commands_dir, #hosts_dir, #initialize, #prompts_dir
Constructor Details
This class inherits a constructor from Expectacle::ThrowerBase
Instance Method Details
#preview_parameter(hosts, commands) ⇒ Object
Preview all parameters for all hosts.
22 23 24 25 26 27 28 |
# File 'lib/expectacle/thrower.rb', line 22 def preview_parameter(hosts, commands) @commands = commands hosts.each do |each| @host_param = each preview_command_for_host end end |
#run_command_for_all_hosts(hosts, commands) ⇒ Object
Run(exec) commands for all hosts.
11 12 13 14 15 16 17 |
# File 'lib/expectacle/thrower.rb', line 11 def run_command_for_all_hosts(hosts, commands) hosts.each do |each| @commands = commands.dup # Notice: @commands will be decremented. @host_param = each run_command_for_host end end |