Module: Capistrano::SSH::Server

Defined in:
lib/capistrano/ssh.rb

Overview

Patch an accessor onto an SSH connection so that we can record the server definition object that defines the connection. This is useful because the gateway returns connections whose “host” is 127.0.0.1, instead of the host on the other side of the tunnel.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#xserverObject

Returns the value of attribute xserver.



17
18
19
# File 'lib/capistrano/ssh.rb', line 17

def xserver
  @xserver
end

Class Method Details

.apply_to(connection, server) ⇒ Object

:nodoc:



11
12
13
14
15
# File 'lib/capistrano/ssh.rb', line 11

def self.apply_to(connection, server)
  connection.extend(Server)
  connection.xserver = server
  connection
end