Class: VagrantPlugins::Parallels::Action::Destroy
- Inherits:
-
Object
- Object
- VagrantPlugins::Parallels::Action::Destroy
- Defined in:
- lib/vagrant-parallels/action/destroy.rb
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.
5 6 7 8 |
# File 'lib/vagrant-parallels/action/destroy.rb', line 5 def initialize(app, env) @app = app @logger = Log4r::Logger.new('vagrant_parallels::action::destroy') end |
Instance Method Details
#call(env) ⇒ Object
10 11 12 13 14 15 16 17 18 19 |
# File 'lib/vagrant-parallels/action/destroy.rb', line 10 def call(env) @logger.info('Disabling password restrictions: remove-vm') env[:machine].provider.driver.disable_password_restrictions(['remove-vm']) env[:ui].info I18n.t('vagrant.actions.vm.destroy.destroying') env[:machine].provider.driver.delete env[:machine].id = nil @app.call(env) end |