Class: VagrantDns::Middleware::Update

Inherits:
Object
  • Object
show all
Defined in:
lib/vagrant_dns/middleware/update.rb

Instance Method Summary collapse

Constructor Details

#initialize(app, env) ⇒ Update

Returns a new instance of Update.



5
6
7
# File 'lib/vagrant_dns/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_dns/middleware/update.rb', line 9

def call(env)
  @app.call(env)
  update env[:machine] if env[:machine].provider.state.id == :running
end