Class: VagrantPlugins::ProviderVeertu::Action::ClearForwardedPorts
- Inherits:
-
Object
- Object
- VagrantPlugins::ProviderVeertu::Action::ClearForwardedPorts
- Defined in:
- lib/vagrant-veertu/action/clear_forwarded_ports.rb
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app, env) ⇒ ClearForwardedPorts
constructor
A new instance of ClearForwardedPorts.
Constructor Details
#initialize(app, env) ⇒ ClearForwardedPorts
Returns a new instance of ClearForwardedPorts.
5 6 7 |
# File 'lib/vagrant-veertu/action/clear_forwarded_ports.rb', line 5 def initialize(app, env) @app = app end |
Instance Method Details
#call(env) ⇒ Object
9 10 11 12 13 14 15 16 |
# File 'lib/vagrant-veertu/action/clear_forwarded_ports.rb', line 9 def call(env) if !env[:machine].provider.driver.read_forwarded_ports.empty? env[:ui].info I18n.t("vagrant.actions.vm.clear_forward_ports.deleting") env[:machine].provider.driver.clear_forwarded_ports end @app.call(env) end |