Class: DC::Container::PortMap
- Inherits:
-
Object
- Object
- DC::Container::PortMap
- Defined in:
- lib/dc.rb
Instance Attribute Summary collapse
-
#external_ip ⇒ Object
readonly
Returns the value of attribute external_ip.
-
#external_port ⇒ Object
readonly
Returns the value of attribute external_port.
-
#internal_port ⇒ Object
readonly
Returns the value of attribute internal_port.
Instance Method Summary collapse
-
#initialize(from:, to:, external_ip: '0.0.0.0') ⇒ PortMap
constructor
A new instance of PortMap.
Constructor Details
#initialize(from:, to:, external_ip: '0.0.0.0') ⇒ PortMap
Returns a new instance of PortMap.
86 87 88 89 90 |
# File 'lib/dc.rb', line 86 def initialize from:, to:, external_ip: '0.0.0.0' @internal_port = from.to_s @external_port = to.to_s @external_ip = external_ip end |
Instance Attribute Details
#external_ip ⇒ Object (readonly)
Returns the value of attribute external_ip.
92 93 94 |
# File 'lib/dc.rb', line 92 def external_ip @external_ip end |
#external_port ⇒ Object (readonly)
Returns the value of attribute external_port.
92 93 94 |
# File 'lib/dc.rb', line 92 def external_port @external_port end |
#internal_port ⇒ Object (readonly)
Returns the value of attribute internal_port.
92 93 94 |
# File 'lib/dc.rb', line 92 def internal_port @internal_port end |