Class: IPSocket
- Inherits:
-
Object
- Object
- IPSocket
- Defined in:
- lib/resolv-replace.rb
Class Method Summary collapse
-
.getaddress(host) ⇒ Object
:startdoc:.
-
.original_resolv_getaddress ⇒ Object
:stopdoc:.
Class Method Details
.getaddress(host) ⇒ Object
:startdoc:
10 11 12 13 14 15 16 |
# 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 |
.original_resolv_getaddress ⇒ Object
:stopdoc:
8 |
# File 'lib/resolv-replace.rb', line 8 alias original_resolv_getaddress getaddress |