Class: Kamal::Cli::Build::PortForwarding
- Inherits:
-
Object
- Object
- Kamal::Cli::Build::PortForwarding
- Defined in:
- lib/kamal/cli/build/port_forwarding.rb
Instance Attribute Summary collapse
-
#hosts ⇒ Object
readonly
Returns the value of attribute hosts.
-
#port ⇒ Object
readonly
Returns the value of attribute port.
-
#ssh_options ⇒ Object
readonly
Returns the value of attribute ssh_options.
Instance Method Summary collapse
- #forward ⇒ Object
-
#initialize(hosts, port, **ssh_options) ⇒ PortForwarding
constructor
A new instance of PortForwarding.
Constructor Details
#initialize(hosts, port, **ssh_options) ⇒ PortForwarding
Returns a new instance of PortForwarding.
6 7 8 9 10 |
# File 'lib/kamal/cli/build/port_forwarding.rb', line 6 def initialize(hosts, port, **) @hosts = hosts @port = port @ssh_options = end |
Instance Attribute Details
#hosts ⇒ Object (readonly)
Returns the value of attribute hosts.
4 5 6 |
# File 'lib/kamal/cli/build/port_forwarding.rb', line 4 def hosts @hosts end |
#port ⇒ Object (readonly)
Returns the value of attribute port.
4 5 6 |
# File 'lib/kamal/cli/build/port_forwarding.rb', line 4 def port @port end |
#ssh_options ⇒ Object (readonly)
Returns the value of attribute ssh_options.
4 5 6 |
# File 'lib/kamal/cli/build/port_forwarding.rb', line 4 def @ssh_options end |
Instance Method Details
#forward ⇒ Object
12 13 14 15 16 17 18 19 |
# File 'lib/kamal/cli/build/port_forwarding.rb', line 12 def forward @done = false forward_ports yield ensure stop end |