Class: VagrantPlugins::AppCatalyst::Action::DestroyVM
- Inherits:
-
Object
- Object
- VagrantPlugins::AppCatalyst::Action::DestroyVM
- Defined in:
- lib/vagrant-vmware-appcatalyst/action/destroy_vm.rb
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app, env) ⇒ DestroyVM
constructor
A new instance of DestroyVM.
Constructor Details
#initialize(app, env) ⇒ DestroyVM
Returns a new instance of DestroyVM.
18 19 20 21 |
# File 'lib/vagrant-vmware-appcatalyst/action/destroy_vm.rb', line 18 def initialize(app, env) @app = app @logger = Log4r::Logger.new('vagrant_appcatalyst::action::destroy_vm') end |
Instance Method Details
#call(env) ⇒ Object
23 24 25 26 27 28 29 |
# File 'lib/vagrant-vmware-appcatalyst/action/destroy_vm.rb', line 23 def call(env) env[:ui].info I18n.t("vagrant.actions.vm.destroy.destroying") env[:appcatalyst_cnx].delete_vm(env[:machine].id) env[:machine].id = nil @app.call(env) end |