Class: Vagrant::Action::Box::Destroy
- Inherits:
-
Object
- Object
- Vagrant::Action::Box::Destroy
- Defined in:
- lib/vagrant/action/box/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.
7 8 9 10 |
# File 'lib/vagrant/action/box/destroy.rb', line 7 def initialize(app, env) @app = app @env = env end |
Instance Method Details
#call(env) ⇒ Object
12 13 14 15 16 17 |
# File 'lib/vagrant/action/box/destroy.rb', line 12 def call(env) env.ui.info I18n.t("vagrant.actions.box.destroy.destroying", :name => env["box"].name) FileUtils.rm_rf(env["box"].directory) @app.call(env) end |