Class: VagrantPlugins::PortRange::Config
- Inherits:
-
Object
- Object
- VagrantPlugins::PortRange::Config
- Defined in:
- lib/vagrant-port-range/config.rb
Instance Attribute Summary collapse
-
#forwarded_ports ⇒ Object
readonly
Returns the value of attribute forwarded_ports.
Instance Method Summary collapse
- #forwarded_port(**options) ⇒ Object
-
#initialize ⇒ Config
constructor
A new instance of Config.
Constructor Details
#initialize ⇒ Config
Returns a new instance of Config.
8 9 10 |
# File 'lib/vagrant-port-range/config.rb', line 8 def initialize @forwarded_ports = {} end |
Instance Attribute Details
#forwarded_ports ⇒ Object (readonly)
Returns the value of attribute forwarded_ports.
6 7 8 |
# File 'lib/vagrant-port-range/config.rb', line 6 def forwarded_ports @forwarded_ports end |
Instance Method Details
#forwarded_port(**options) ⇒ Object
12 13 14 15 16 17 18 19 20 21 |
# File 'lib/vagrant-port-range/config.rb', line 12 def forwarded_port(**) = .dup if ![:id] [:id] = "#{SecureRandom.uuid}" end id = [:id] forwarded_ports[id] = end |