Skip to content

End of Life Ruby 3.0 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →

instance method

Resolv::DNS#getaddress

getaddress(name)

Gets the IP address of name from the DNS resolver.

name can be a Resolv::DNS::Name or a String. Retrieved address will be a Resolv::IPv4 or Resolv::IPv6