Class: Vagrant::LXC::Action::Destroy

Inherits:
Object
  • Object
show all
Defined in:
lib/vagrant-lxc/action/destroy.rb

Instance Method Summary collapse

Constructor Details

#initialize(app, env) ⇒ Destroy

Returns a new instance of Destroy.



5
6
7
# File 'lib/vagrant-lxc/action/destroy.rb', line 5

def initialize(app, env)
  @app = app
end

Instance Method Details

#call(env) ⇒ Object



9
10
11
12
13
14
# File 'lib/vagrant-lxc/action/destroy.rb', line 9

def call(env)
  env[:ui].info I18n.t("vagrant.actions.vm.destroy.destroying")
  env[:machine].provider.driver.destroy
  env[:machine].id = nil
  @app.call env
end