From d07ac8ecbedb4831e5aa677b8878f0e8eb37e363 Mon Sep 17 00:00:00 2001 From: Steve Kemp Date: Mon, 9 Mar 2015 13:21:36 +0000 Subject: Whitespace fixups. These were all identified and suggested by rubocop. --- lib/custodian/util/ping.rb | 2 +- lib/custodian/util/timespan.rb | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'lib/custodian/util') diff --git a/lib/custodian/util/ping.rb b/lib/custodian/util/ping.rb index f8b7c75..3b3586e 100644 --- a/lib/custodian/util/ping.rb +++ b/lib/custodian/util/ping.rb @@ -78,7 +78,7 @@ module Custodian if (system("ping6 -c 1 #{@resolved} 2>/dev/null >/dev/null") == true) return true end - elsif(is_ipv4?) + elsif is_ipv4? if (system("ping -c 1 #{@resolved} 2>/dev/null >/dev/null") == true) return true end diff --git a/lib/custodian/util/timespan.rb b/lib/custodian/util/timespan.rb index 9b79867..c0ca4eb 100644 --- a/lib/custodian/util/timespan.rb +++ b/lib/custodian/util/timespan.rb @@ -33,8 +33,8 @@ module Custodian # # Ensure within a valid range # - raise ArgumentError, 'Integer required for time' unless(desc.kind_of? Integer) - raise ArgumentError, "Invalid time: #{desc}" unless((desc >= 0) && (desc <= 23)) + raise ArgumentError, 'Integer required for time' unless desc.kind_of? Integer + raise ArgumentError, "Invalid time: #{desc}" unless (desc >= 0) && (desc <= 23) # @@ -67,12 +67,12 @@ module Custodian # Iterate over the hours. Store in a hash. # hour = p_start - while(hour != p_end) + while (hour != p_end) valid[hour] = 1 hour += 1 hour = 0 if hour > 23 end - valid[p_end]=1 + valid[p_end] = 1 # # Return the hash -- cgit v1.2.1