diff options
author | Steve Kemp <steve@steve.org.uk> | 2015-03-09 14:43:10 +0000 |
---|---|---|
committer | Steve Kemp <steve@steve.org.uk> | 2015-03-09 14:43:10 +0000 |
commit | 1165790e7986d920c149afd0898bfc82a34249a5 (patch) | |
tree | 22ec90be31ac77469ce6aa68e9215a5738024c57 /lib/custodian/util/ping.rb | |
parent | 26f013750196c5028135216de386496696b02a09 (diff) |
Removed trailing whitespace from the code
Diffstat (limited to 'lib/custodian/util/ping.rb')
-rw-r--r-- | lib/custodian/util/ping.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/custodian/util/ping.rb b/lib/custodian/util/ping.rb index 3b3586e..a4c6075 100644 --- a/lib/custodian/util/ping.rb +++ b/lib/custodian/util/ping.rb @@ -26,7 +26,7 @@ module Custodian # def initialize(hostname) - raise ArgumentError, 'Hostname must not be nil' if hostname.nil? + raise ArgumentError, 'Hostname must not be nil' if hostname.nil? raise ArgumentError, 'Hostname must be a String' unless hostname.kind_of?(String) @hostname = hostname @@ -47,7 +47,7 @@ module Custodian # Does the hostname resolve to an IPv4 address? # def is_ipv4? - if (! @resolved.nil?) && (@resolved =~ /^([0-9]+).([0-9]+).([0-9]+).([0-9]+)$/) + if (! @resolved.nil?) && (@resolved =~ /^([0-9]+).([0-9]+).([0-9]+).([0-9]+)$/) true else false @@ -59,7 +59,7 @@ module Custodian # Does the hostname resolve to an IPv6 address? # def is_ipv6? - if (! @resolved.nil?) && (@resolved =~ /^([a-f0-9:]+)$/i) + if (! @resolved.nil?) && (@resolved =~ /^([a-f0-9:]+)$/i) true else false @@ -74,7 +74,7 @@ module Custodian # Return false on error. # def run_ping - if is_ipv6? + if is_ipv6? if (system("ping6 -c 1 #{@resolved} 2>/dev/null >/dev/null") == true) return true end |