Class: MediaWikiVagrant::Destroy
- Defined in:
- lib/mediawiki-vagrant/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.
5 6 7 8 |
# File 'lib/mediawiki-vagrant/destroy.rb', line 5 def initialize(app, env) @app = app @mwv = Environment.new(env[:root_path] || env[:cwd]) end |
Instance Method Details
#call(env) ⇒ Object
10 11 12 13 14 15 16 |
# File 'lib/mediawiki-vagrant/destroy.rb', line 10 def call(env) if @mwv.valid? env[:ui].info 'Removing puppet created files...' @mwv.purge_puppet_created_files end @app.call(env) end |