Class: TBM::Tunnel

Inherits:
Object
  • Object
show all
Defined in:
lib/TBM/tunnel.rb

Overview

Represents a particular tunnel, possibly one of many for a given target.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(port, options = {}) ⇒ Tunnel

Returns a new instance of Tunnel.



7
8
9
10
# File 'lib/TBM/tunnel.rb', line 7

def initialize( port, options = {} )
  @port = port
  @options = options
end

Instance Attribute Details

#portObject (readonly)

Returns the value of attribute port.



5
6
7
# File 'lib/TBM/tunnel.rb', line 5

def port
  @port
end

Instance Method Details

#remote_hostObject



20
21
22
# File 'lib/TBM/tunnel.rb', line 20

def remote_host
  @options[:remote_host]
end

#remote_host_addrObject



16
17
18
# File 'lib/TBM/tunnel.rb', line 16

def remote_host_addr
  @options[:remote_host] || 'localhost'
end

#remote_portObject



12
13
14
# File 'lib/TBM/tunnel.rb', line 12

def remote_port
  @options[:remote_port] || port
end