Class: Wemux::Pair::Commands::StartClientSession
- Defined in:
- lib/wemux/pair/commands/start_client_session.rb
Instance Method Summary collapse
Methods inherited from Command
Constructor Details
This class inherits a constructor from Wemux::Pair::Commands::Command
Instance Method Details
#execute ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/wemux/pair/commands/start_client_session.rb', line 9 def execute if in_tmux? puts "Please do not run from within tmux or wemux" exit 1 end tunnel = ClientTunnel.new(port_offset) if tunnel.open connection = PairConnection.new(tunnel) connection.connect else ClientTunnel.tunnel_failure! end end |