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.



75
76
77
78
79
# File 'lib/dc.rb', line 75

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.



81
82
83
# File 'lib/dc.rb', line 81

def external_ip
  @external_ip
end

#external_portObject (readonly)

Returns the value of attribute external_port.



81
82
83
# File 'lib/dc.rb', line 81

def external_port
  @external_port
end

#internal_portObject (readonly)

Returns the value of attribute internal_port.



81
82
83
# File 'lib/dc.rb', line 81

def internal_port
  @internal_port
end