Class: VagrantPlugins::ProviderBhyve::Action::Destroy

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

Instance Method Summary collapse

Constructor Details

#initialize(app, env) ⇒ Destroy

Returns a new instance of Destroy.



8
9
10
11
# File 'lib/vagrant-bhyve/action/destroy.rb', line 8

def initialize(app, env)
  @logger = Log4r::Logger.new("vagrant_bhyve::action::destroy")
  @app = app
end

Instance Method Details

#call(env) ⇒ Object



13
14
15
16
17
18
# File 'lib/vagrant-bhyve/action/destroy.rb', line 13

def call(env)
  env[:ui].info I18n.t('vagrant_bhyve.action.vm.destroying')
  env[:machine].provider.driver.destroy

  @app.call(env)
end