123456789_123456789_123456789_123456789_123456789_

Class: IPSocket

Relationships & Source Files
Extension / Inclusion / Inheritance Descendants
Subclasses:
Inherits: Object
Defined in: lib/resolv-replace.rb

Class Method Summary

Class Method Details

.getaddress(host)

[ GitHub ]

  
# File 'lib/resolv-replace.rb', line 10

def getaddress(host)
  begin
    return Resolv.getaddress(host).to_s
  rescue Resolv::ResolvError
    raise SocketError, "Hostname not known: #{host}"
  end
end