Class: SSHKit::Coordinator

### Home Classes Methods

### In Files

- lib/sshkit/coordinator.rb

### Parent

Object

### Methods

- ::new
- #each

### Class/Module Index

Quicksearch

- SSHKit
- SSHKit::Backend
- SSHKit::Backend::Abstract
- SSHKit::Backend::ConnectionPool
- SSHKit::Backend::Local
- SSHKit::Backend::Netssh
- SSHKit::Backend::Netssh::Configuration
- SSHKit::Backend::Printer
- SSHKit::Backend::Skipper
- SSHKit::CommandMap
- SSHKit::CommandMap::CommandHash
- SSHKit::CommandMap::PrefixProvider
- SSHKit::Configuration
- SSHKit::Coordinator
- SSHKit::DSL
- SSHKit::Formatter
- SSHKit::Formatter::Abstract
- SSHKit::Formatter::BlackHole
- SSHKit::Formatter::Dot
- SSHKit::Formatter::Pretty
- SSHKit::Formatter::SimpleText
- SSHKit::Host
- SSHKit::HostWithPortParser
- SSHKit::HostWithUsernameAndPortParser
- SSHKit::HostWithUsernameParser
- SSHKit::IPv6HostWithPortParser
- SSHKit::LogMessage
- SSHKit::Logger
- SSHKit::Logger::SSHKit
- SSHKit::Logger::SSHKit::Logger
- SSHKit::Logger::SSHKit::Logger::Net
- SSHKit::Logger::SSHKit::Logger::Net::SSH
- SSHKit::Logger::SSHKit::Logger::Net::SSH::LogLevelShim
- SSHKit::Runner
- SSHKit::Runner::Abstract
- SSHKit::Runner::ExecuteError
- SSHKit::Runner::Group
- SSHKit::Runner::Null
- SSHKit::Runner::Parallel
- SSHKit::Runner::Sequential
- SSHKit::SimpleHostParser
- SSHKit::Utils
- SSHKit::Utils::CaptureOutputMethods
- Net
- Net::SSH
- Net::SSH::Config
- Array
- Color
- Hash
- Object

No matching classes.

# SSHKit::Coordinator

### Attributes

hosts[RW]

### Public Class Methods

new(raw_hosts) click to toggle source

    # File lib/sshkit/coordinator.rb, line 7
    def initialize(raw_hosts)
      @raw_hosts = Array(raw_hosts)
      @hosts = @raw_hosts.any? ? resolve_hosts : []
    end

### Public Instance Methods

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

    # File lib/sshkit/coordinator.rb, line 12
    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
        else
          raise RuntimeError, "Don't know how to handle run style #{options[:in].inspect}"
        end.new(hosts, options, &block).execute
      else
        Runner::Null.new(hosts, options, &block).execute
      end
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.