Class: Vagrant::Action::VM::ProvisionerCleanup
- Inherits:
-
Object
- Object
- Vagrant::Action::VM::ProvisionerCleanup
- Defined in:
- lib/vagrant/action/vm/provisioner_cleanup.rb
Instance Method Summary collapse
- #call(env) ⇒ Object
- #enabled_provisioners ⇒ Object
-
#initialize(app, env) ⇒ ProvisionerCleanup
constructor
A new instance of ProvisionerCleanup.
Constructor Details
#initialize(app, env) ⇒ ProvisionerCleanup
Returns a new instance of ProvisionerCleanup.
5 6 7 8 |
# File 'lib/vagrant/action/vm/provisioner_cleanup.rb', line 5 def initialize(app, env) @app = app @env = env end |
Instance Method Details
#call(env) ⇒ Object
10 11 12 13 14 15 16 |
# File 'lib/vagrant/action/vm/provisioner_cleanup.rb', line 10 def call(env) enabled_provisioners.each do |instance| instance.cleanup end @app.call(env) end |
#enabled_provisioners ⇒ Object
18 19 20 21 22 |
# File 'lib/vagrant/action/vm/provisioner_cleanup.rb', line 18 def enabled_provisioners @env[:vm].config.vm.provisioners.map do |provisioner| provisioner.provisioner.new(@env, provisioner.config) end end |