Class: Vagrant::Actions::VM::Destroy
- Defined in:
- lib/vagrant/actions/vm/destroy.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
#cleanup, #follows, #initialize, #precedes, #prepare, #rescue
Methods included from Util
#error_and_exit, included, #logger, #wrap_output
Constructor Details
This class inherits a constructor from Vagrant::Actions::Base
Instance Method Details
#depersist ⇒ Object
17 18 19 |
# File 'lib/vagrant/actions/vm/destroy.rb', line 17 def depersist @runner.env.depersist_vm end |
#destroy_vm ⇒ Object
12 13 14 15 |
# File 'lib/vagrant/actions/vm/destroy.rb', line 12 def destroy_vm logger.info "Destroying VM and associated drives..." @runner.vm.destroy(:destroy_image => true) end |
#execute! ⇒ Object
5 6 7 8 9 10 |
# File 'lib/vagrant/actions/vm/destroy.rb', line 5 def execute! @runner.invoke_around_callback(:destroy) do destroy_vm depersist end end |