Module: SSHKit

Defined in:
lib/sshkit/command.rb,
lib/sshkit.rb,
lib/sshkit/dsl.rb,
lib/sshkit/host.rb,
lib/sshkit/logger.rb,
lib/sshkit/version.rb,
lib/sshkit/exception.rb,
lib/sshkit/command_map.rb,
lib/sshkit/coordinator.rb,
lib/sshkit/log_message.rb,
lib/sshkit/runners/null.rb,
lib/sshkit/configuration.rb,
lib/sshkit/runners/group.rb,
lib/sshkit/backends/local.rb,
lib/sshkit/formatters/dot.rb,
lib/sshkit/backends/netssh.rb,
lib/sshkit/backends/printer.rb,
lib/sshkit/backends/skipper.rb,
lib/sshkit/runners/abstract.rb,
lib/sshkit/runners/parallel.rb,
lib/sshkit/backends/abstract.rb,
lib/sshkit/formatters/pretty.rb,
lib/sshkit/runners/sequential.rb,
lib/sshkit/formatters/abstract.rb,
lib/sshkit/formatters/black_hole.rb,
lib/sshkit/formatters/simple_text.rb,
lib/sshkit/backends/connection_pool.rb,
lib/sshkit/utils/capture_output_methods.rb

Overview

 @author Lee Hambley

Defined Under Namespace

Modules: Backend, CommandHelper, DSL, Formatter, Runner, Utils Classes: Command, CommandMap, Configuration, Coordinator, Host, HostWithPortParser, LogMessage, Logger

Constant Summary collapse

StandardError =
Class.new(::StandardError)
UnparsableHostStringError =
Class.new(SSHKit::StandardError)
VERSION =
"1.7.1"

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.configObject

Returns the value of attribute config.



7
8
9
# File 'lib/sshkit.rb', line 7

def config
  @config
end

Class Method Details

.capture_output(io, &block) ⇒ Object



9
10
11
12
13
14
15
16
# File 'lib/sshkit.rb', line 9

def capture_output(io, &block)
  original_io = config.output
  config.output = io
  config.output.extend(SSHKit::Utils::CaptureOutputMethods)
  yield
ensure
  config.output = original_io
end

.configure {|config| ... } ⇒ Object

Yields:



18
19
20
21
# File 'lib/sshkit.rb', line 18

def configure
  @@config ||= Configuration.new
  yield config
end

.reset_configuration!Object



27
28
29
# File 'lib/sshkit.rb', line 27

def reset_configuration!
  @@config = nil
end