diff options
author | Steve Kemp <steve@steve.org.uk> | 2015-03-09 13:19:47 +0000 |
---|---|---|
committer | Steve Kemp <steve@steve.org.uk> | 2015-03-09 13:19:47 +0000 |
commit | 54b21cf54c51dfe40784a8096f84c7a80b015bd4 (patch) | |
tree | 4763692624732650daf1a9e02c91576d3f7ee8d0 /lib/custodian/util/dns.rb | |
parent | a22b8e96ead33b0f97ed5243dbad7f7b6cd5135d (diff) |
Removed spaces inside parenthesis.
Diffstat (limited to 'lib/custodian/util/dns.rb')
-rw-r--r-- | lib/custodian/util/dns.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/custodian/util/dns.rb b/lib/custodian/util/dns.rb index 2a0c705..b93fef5 100644 --- a/lib/custodian/util/dns.rb +++ b/lib/custodian/util/dns.rb @@ -20,7 +20,7 @@ module Custodian # # Return the reverse DNS for the specified IP address, nil on failure. # - def DNS.ip_to_hostname( ip ) + def DNS.ip_to_hostname(ip) resolved = nil # @@ -30,9 +30,9 @@ module Custodian period = settings.timeout begin - timeout( period ) do + timeout(period) do begin - resolved = Socket.getnameinfo(Socket.sockaddr_in(80, ip) ).first + resolved = Socket.getnameinfo(Socket.sockaddr_in(80, ip)).first rescue SocketError resolved = nil end @@ -47,7 +47,7 @@ module Custodian # # Convert a hostname to an IP address, return nil on failure. # - def DNS.hostname_to_ip( hostname ) + def DNS.hostname_to_ip(hostname) resolved = nil @@ -58,7 +58,7 @@ module Custodian period = settings.timeout begin - timeout( period ) do + timeout(period) do begin Socket.getaddrinfo(hostname, 'echo').each do |a| resolved = a[3] if a |