Module: Dabcup::Tunnel
- Defined in:
- lib/dabcup/database.rb
Instance Method Summary collapse
Instance Method Details
#disconnect ⇒ Object
54 55 56 |
# File 'lib/dabcup/database.rb', line 54 def disconnect @ssh.close if @ssh end |
#ssh ⇒ Object
50 51 52 |
# File 'lib/dabcup/database.rb', line 50 def ssh @ssh ||= Net::SSH.start(tunnel.host, tunnel.user, :password => tunnel.password) end |
#system(command, interpolation = {}) ⇒ Object
45 46 47 48 |
# File 'lib/dabcup/database.rb', line 45 def system(command, interpolation = {}) command = command % interpolation stdout = ssh.exec!(command) end |