Class: VagrantPlugins::ProviderLocal::Action::Destroy

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

Overview

This will destroy the instance

Instance Method Summary collapse

Constructor Details

#initialize(app, _env) ⇒ Destroy

Returns a new instance of Destroy.



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

def initialize(app, _env)
  @logger = Log4r::Logger.new('vagrant_local::action::import')
  @app = app
end

Instance Method Details

#call(env) ⇒ Object



16
17
18
19
20
21
# File 'lib/vagrant-local/action/destroy.rb', line 16

def call(env)
  @machine = env[:machine]
  @driver = @machine.provider.driver
  @driver.destroy(env[:ui])
  @app.call(env)
end