Class: TBM::Tunnel
- Inherits:
-
Object
- Object
- TBM::Tunnel
- Defined in:
- lib/TBM/tunnel.rb
Overview
Represents a particular tunnel, possibly one of many for a given target.
Instance Attribute Summary collapse
-
#port ⇒ Object
readonly
Returns the value of attribute port.
Instance Method Summary collapse
-
#initialize(port, options = {}) ⇒ Tunnel
constructor
A new instance of Tunnel.
- #remote_host ⇒ Object
- #remote_host_addr ⇒ Object
- #remote_port ⇒ Object
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, = {} ) @port = port @options = end |
Instance Attribute Details
#port ⇒ Object (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_host ⇒ Object
20 21 22 |
# File 'lib/TBM/tunnel.rb', line 20 def remote_host @options[:remote_host] end |
#remote_host_addr ⇒ Object
16 17 18 |
# File 'lib/TBM/tunnel.rb', line 16 def remote_host_addr @options[:remote_host] || 'localhost' end |
#remote_port ⇒ Object
12 13 14 |
# File 'lib/TBM/tunnel.rb', line 12 def remote_port @options[:remote_port] || port end |