Class: VagrantPlugins::Utm::Action::Destroy
- Inherits:
-
Object
- Object
- VagrantPlugins::Utm::Action::Destroy
- Defined in:
- lib/vagrant_utm/action/destroy.rb
Overview
This action destroys the running machine.
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app, _env) ⇒ Destroy
constructor
A new instance of Destroy.
Constructor Details
#initialize(app, _env) ⇒ Destroy
Returns a new instance of Destroy.
11 12 13 |
# File 'lib/vagrant_utm/action/destroy.rb', line 11 def initialize(app, _env) @app = app end |
Instance Method Details
#call(env) ⇒ Object
15 16 17 18 19 20 21 |
# File 'lib/vagrant_utm/action/destroy.rb', line 15 def call(env) env[:ui].info I18n.t("vagrant.actions.vm.destroy.destroying") env[:machine].provider.driver.delete env[:machine].id = nil @app.call(env) end |