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:
8 9 10 11 12 13 14 |
# File 'lib/resolv-replace.rb', line 8 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:
6 |
# File 'lib/resolv-replace.rb', line 6 alias original_resolv_getaddress getaddress |