Method: SSHKit::Coordinator#each
- Defined in:
- lib/sshkit/coordinator.rb
#each(options = {}, &block) ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/sshkit/coordinator.rb', line 12 def each(={}, &block) if hosts = .merge() case [:in] when :parallel then Runner::Parallel when :sequence then Runner::Sequential when :groups then Runner::Group else raise RuntimeError, "Don't know how to handle run style #{options[:in].inspect}" end.new(hosts, &block).execute else Runner::Null.new(hosts, &block).execute end end |