Sha256: 42476a4a1c2bf11138764686894b21926c27d2054601118abef2f19c8292a8b7

Contents?: true

Size: 281 Bytes

Versions: 6

Compression:

Stored size: 281 Bytes

Contents

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

	def call(env)
	  @app.call(env)
	  remove env[:vm] if env["vm"].created?
	end

	protected
	def remove(vm)
        VagrantDns::NetworkBinder.new.unbind(vm)
	end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
vagrant-dns-server-0.4.3 lib/vagrant_dns/middleware/remove.rb
vagrant-dns-server-0.4.2 lib/vagrant_dns/middleware/remove.rb
vagrant-dns-server-0.4.1 lib/vagrant_dns/middleware/remove.rb
vagrant-dns-server-0.4 lib/vagrant_dns/middleware/remove.rb
vagrant-dns-server-0.3 lib/vagrant_dns/middleware/remove.rb
vagrant-dns-server-0.2 lib/vagrant_dns/middleware/remove.rb