Class: Dizby::BasicTunnel

Inherits:
AbstractTunnel show all
Defined in:
lib/dizby/tunnel/basic.rb

Instance Attribute Summary

Attributes inherited from AbstractTunnel

#local_port, #remote_port

Instance Method Summary collapse

Methods inherited from AbstractTunnel

#get_and_write_ports, #open_ssh, #read_ports

Constructor Details

#initialize(server, strategy, user, host) ⇒ BasicTunnel

Returns a new instance of BasicTunnel.


8
9
10
11
12
# File 'lib/dizby/tunnel/basic.rb', line 8

def initialize(server, strategy, user, host)
  @working = true

  super(server, strategy, user, host)
end

Instance Method Details

#close

TODO: test this


18
19
20
21
# File 'lib/dizby/tunnel/basic.rb', line 18

def close # TODO: test this
  @working = false
  super
end

#wait(ssh)


14
15
16
# File 'lib/dizby/tunnel/basic.rb', line 14

def wait(ssh)
  ssh.loop { @working }
end