Class: VagrantPlugins::Destroyer::Action::Destroy
- Inherits:
-
Object
- Object
- VagrantPlugins::Destroyer::Action::Destroy
- Defined in:
- lib/vagrant-destroyer/action.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.
5 6 7 8 |
# File 'lib/vagrant-destroyer/action.rb', line 5 def initialize(app, env) @app = app @logger = Log4r::Logger.new("vagrant::destroyer::action::destroy") end |
Instance Method Details
#call(env) ⇒ Object
10 11 12 13 14 15 16 17 18 19 |
# File 'lib/vagrant-destroyer/action.rb', line 10 def call(env) return @app.call(env) if !env[:machine].config.destroy.enable @env = env @env[:machine].action(:destroy,:force_confirm_destroy => true) @app.call env end |