class Tunneler::SshTunnel
Attributes
options[R]
Public Class Methods
new(user, host, options={})
click to toggle source
# File lib/tunneler/ssh_tunnel.rb, line 6 def initialize(user, host, options={}) @user = user @host = host @options = Ssh.merge_options(options) connect end
Public Instance Methods
connect()
click to toggle source
# File lib/tunneler/ssh_tunnel.rb, line 14 def connect @gateway = Gateway.connect(@host, @user, @options) end
remote(user, host, options={})
click to toggle source
# File lib/tunneler/ssh_tunnel.rb, line 18 def remote(user, host, options={}) Remote.new(@gateway, user, host, Ssh.merge_options(options)) end
terminate()
click to toggle source
# File lib/tunneler/ssh_tunnel.rb, line 22 def terminate @gateway.shutdown! end