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,
lib/sshkit/backends/netssh/scp_transfer.rb,
lib/sshkit/backends/netssh/sftp_transfer.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


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

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