Class: Vagrant::Hostmaster::Middleware::Remove

Inherits:
Object
  • Object
show all
Defined in:
lib/vagrant/hostmaster/middleware/remove.rb

Instance Method Summary collapse

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