Class: VagrantAWS::Action::Terminate

Inherits:
Object
  • Object
show all
Defined in:
lib/vagrant-aws/action/terminate.rb

Instance Method Summary collapse

Constructor Details

#initialize(app, env) ⇒ Terminate

Returns a new instance of Terminate.



4
5
6
# File 'lib/vagrant-aws/action/terminate.rb', line 4

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

Instance Method Details

#call(env) ⇒ Object



8
9
10
11
12
13
14
15
# File 'lib/vagrant-aws/action/terminate.rb', line 8

def call(env)
	env.ui.info I18n.t("vagrant.actions.vm.destroy.destroying")

	env["vm"].vm.destroy
	env["vm"].vm = nil

	@app.call(env)
end