class Bcome::Ssh::Tunnel::LocalPortForward
Public Class Methods
new(tunnel_command)
click to toggle source
# File lib/objects/ssh/tunnel/local_port_forward.rb, line 5 def initialize(tunnel_command) @tunnel_command = tunnel_command @process_pid = nil end
Public Instance Methods
close!()
click to toggle source
# File lib/objects/ssh/tunnel/local_port_forward.rb, line 14 def close! puts "Closing tunnel:\s".informational + @tunnel_command.to_s.terminal_prompt ::Process.kill('HUP', @process_pid) end
open!()
click to toggle source
# File lib/objects/ssh/tunnel/local_port_forward.rb, line 10 def open! @process_pid = spawn(@tunnel_command) end