Class: IPSocket

Inherits:
Object
  • Object
show all
Defined in:
lib/resolv-replace.rb

Class Method Summary collapse

Class Method Details

.getaddress(host) ⇒ Object



6
7
8
9
10
11
12
# File 'lib/resolv-replace.rb', line 6

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

.original_resolv_getaddressObject



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

alias original_resolv_getaddress getaddress