lib/dnsbl/client.rb
# Monkeypatch the nameservers to set a default if there are no defined nameservers
Monkeypatch the nameservers to set a default if there are no defined nameservers
Monkeypatch the nameservers to set a default if there are no defined nameservers
def nameservers
		return @nameservers if @nameservers
		lazy_initialize
		if self.respond_to? :nameserver_port
			@nameservers = nameserver_port
		else
			@nameserver ||= ['4.2.2.2','4.2.2.5','8.8.4.4','8.8.8.8','208.67.222.222','208.67.220.220'].sort {rand}
			@nameservers ||= @nameserver.map {|i| [i, 53] }
		end
		@nameservers
	end
def nameservers return @nameservers if @nameservers lazy_initialize if self . respond_to? :nameserver_port @nameservers = nameserver_port else @nameserver ||= [ '4.2.2.2' , '4.2.2.5' , '8.8.4.4' , '8.8.8.8' , '208.67.222.222' , '208.67.220.220' ] . sort { rand } @nameservers ||= @nameserver . map { | i | [ i , 53 ] } end @nameservers end
Monkeypatch the nameservers to set a default if there are no defined nameservers
Monkeypatch the nameservers to set a default if there are no defined nameservers