Class: Train::Transports::SSH
- Inherits:
-
Object
- Object
- Train::Transports::SSH
- Defined in:
- lib/train/transports/ssh.rb,
lib/train/transports/ssh_connection.rb
Overview
A Transport which uses the SSH protocol to execute commands and transfer files.
Defined Under Namespace
Classes: Connection
Instance Method Summary collapse
Instance Method Details
#connection(state = {}, &block) ⇒ Object
67 68 69 70 71 72 73 74 75 76 77 |
# File 'lib/train/transports/ssh.rb', line 67 def connection(state = {}, &block) opts = (, state || {}) (opts) conn_opts = (opts) if defined?(@connection) && @connection_options == conn_opts reuse_connection(&block) else create_new_connection(conn_opts, &block) end end |