Sha256: ba0be5ca202499c1a60fc54e154870d43c32703784a719a85271b7c9c648fb9e

Contents?: true

Size: 288 Bytes

Versions: 3

Compression:

Stored size: 288 Bytes

Contents

module VagrantDns
  module Middleware
    class Update
	def initialize(app, env)
	  @app = app
	end

	def call(env)
	  @app.call(env)
	  update env[:vm] if env["vm"].state == :running
	end

	protected
	def update(vm)
        VagrantDns::NetworkBinder.new.bind(vm)
	end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
vagrant-dns-server-0.3 lib/vagrant_dns/middleware/update.rb
vagrant-dns-server-0.2 lib/vagrant_dns/middleware/update.rb
vagrant-dns-server-0.1 lib/middleware/update.rb