Class: Vagrant::Hostmaster::Middleware::Remove
- Inherits:
-
Object
- Object
- Vagrant::Hostmaster::Middleware::Remove
- Defined in:
- lib/vagrant/hostmaster/middleware/remove.rb
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app, env) ⇒ Remove
constructor
A new instance of Remove.
Constructor Details
#initialize(app, env) ⇒ Remove
Returns a new instance of Remove.
5 6 7 |
# File 'lib/vagrant/hostmaster/middleware/remove.rb', line 5 def initialize(app, env) @app = app end |
Instance Method Details
#call(env) ⇒ Object
9 10 11 12 |
# File 'lib/vagrant/hostmaster/middleware/remove.rb', line 9 def call(env) remove env[:vm] if env["vm"].created? @app.call(env) end |