method
new
v1_8_7_72 -
Show latest stable
- Class:
Resolv::DNS
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)