new(config_info=nil)
public
Creates a new DNS resolver.
config_info can be:
nil |
Uses /etc/resolv.conf.
|
String |
Path to a file using /etc/resolv.conf’s format.
|
Hash |
Must contain :nameserver, :search and :ndots keys.
|
Example:
Resolv::DNS.new(:nameserver => ['210.251.121.21'],
:search => ['ruby-lang.org'],
:ndots => 1)
Show source
def initialize(config_info=nil)
@mutex = Mutex.new
@config = Config.new(config_info)
@initialized = nil
end