Module: SSHKit::Backend

Defined in:
lib/sshkit/backends/local.rb,
lib/sshkit/backends/netssh.rb,
lib/sshkit/backends/printer.rb,
lib/sshkit/backends/skipper.rb,
lib/sshkit/backends/abstract.rb,
lib/sshkit/backends/netssh/known_hosts.rb

Defined Under Namespace

Classes: Abstract, ConnectionPool, Local, Netssh, Printer, Skipper

Constant Summary collapse

MethodUnavailableError =
Class.new(SSHKit::StandardError)

Class Method Summary collapse

Class Method Details

.currentObject

The Backend instance that is running in the current thread. If no Backend is running, returns `nil` instead.

Example:

on(:local) do
  self == SSHKit::Backend.current # => true
end

16
17
18
# File 'lib/sshkit/backends/abstract.rb', line 16

def self.current
  Thread.current["sshkit_backend"]
end