Class: Vagrant::Hostmaster::Middleware::Update
- Inherits:
-
Object
- Object
- Vagrant::Hostmaster::Middleware::Update
- Defined in:
- lib/vagrant/hostmaster/middleware/update.rb
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app, env) ⇒ Update
constructor
A new instance of Update.
Constructor Details
#initialize(app, env) ⇒ Update
Returns a new instance of Update.
5 6 7 |
# File 'lib/vagrant/hostmaster/middleware/update.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/update.rb', line 9 def call(env) @app.call(env) update env[:vm] if env["vm"].state == :running end |