Maintenance Ruby 3.4 gets fixes, but no new features. Switch to Ruby 4.0 →
instance method
Resolv::Hosts#getaddress
(::String name) -> ::String
getaddress(name)
lib/resolv.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.4.1/lib/resolv.rb, line 222
def getaddress(name)
each_address(name) {|address| return address}
raise ResolvError.new("#{@filename} has no name: #{name}")
end
Gets the IP address of name from the hosts file.