Class: DC::Container::PortMap

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

Instance Attribute Summary collapse

Instance Method Summary collapse

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_ipObject (readonly)

Returns the value of attribute external_ip.



92
93
94
# File 'lib/dc.rb', line 92

def external_ip
  @external_ip
end

#external_portObject (readonly)

Returns the value of attribute external_port.



92
93
94
# File 'lib/dc.rb', line 92

def external_port
  @external_port
end

#internal_portObject (readonly)

Returns the value of attribute internal_port.



92
93
94
# File 'lib/dc.rb', line 92

def internal_port
  @internal_port
end