Class: ComposePort
- Inherits:
-
Object
- Object
- ComposePort
- Defined in:
- lib/docker-compose/models/compose_port.rb
Instance Attribute Summary collapse
-
#container_port ⇒ Object
readonly
Returns the value of attribute container_port.
-
#host_ip ⇒ Object
readonly
Returns the value of attribute host_ip.
-
#host_port ⇒ Object
readonly
Returns the value of attribute host_port.
Instance Method Summary collapse
-
#initialize(container_port, host_port = nil, host_ip = nil) ⇒ ComposePort
constructor
A new instance of ComposePort.
Constructor Details
#initialize(container_port, host_port = nil, host_ip = nil) ⇒ ComposePort
Returns a new instance of ComposePort.
4 5 6 7 8 |
# File 'lib/docker-compose/models/compose_port.rb', line 4 def initialize(container_port, host_port = nil, host_ip = nil) @container_port = container_port @host_ip = host_ip @host_port = host_port end |
Instance Attribute Details
#container_port ⇒ Object (readonly)
Returns the value of attribute container_port.
2 3 4 |
# File 'lib/docker-compose/models/compose_port.rb', line 2 def container_port @container_port end |
#host_ip ⇒ Object (readonly)
Returns the value of attribute host_ip.
2 3 4 |
# File 'lib/docker-compose/models/compose_port.rb', line 2 def host_ip @host_ip end |
#host_port ⇒ Object (readonly)
Returns the value of attribute host_port.
2 3 4 |
# File 'lib/docker-compose/models/compose_port.rb', line 2 def host_port @host_port end |