Class: VagrantPlugins::ProviderZone::Action::Destroy
- Inherits:
-
Object
- Object
- VagrantPlugins::ProviderZone::Action::Destroy
- Defined in:
- lib/vagrant-zones/action/destroy.rb
Overview
This will destroy the zone
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.
11 12 13 14 |
# File 'lib/vagrant-zones/action/destroy.rb', line 11 def initialize(app, _env) @logger = Log4r::Logger.new('vagrant_zones::action::import') @app = app end |
Instance Method Details
#call(env) ⇒ Object
16 17 18 19 20 21 22 23 |
# File 'lib/vagrant-zones/action/destroy.rb', line 16 def call(env) @machine = env[:machine] @driver = @machine.provider.driver @driver.halt(env[:ui]) @driver.destroy(env[:ui]) @driver.delete_dataset(env[:ui]) @app.call(env) end |