class SSHKit::Coordinator

Public Instance Methods

each(options={}, &block) click to toggle source

overrides original method to include chunks runner

# File lib/sshkit/chunky/runner/coordinator.rb, line 6
def each(options={}, &block)
  if hosts
    options = default_options.merge(options)
    case options[:in]
    when :parallel then Runner::Parallel
    when :sequence then Runner::Sequential
    when :groups   then Runner::Group
    when :chunks   then SSHKit::Chunky::Runner::Chunks # <- added
    else
      options[:in]
    end.new(hosts, options, &block).execute
  else
    Runner::Null.new(hosts, options, &block).execute
  end
end