summaryrefslogtreecommitdiff
path: root/lib/custodian/util/timespan.rb
diff options
context:
space:
mode:
authorSteve Kemp <steve@steve.org.uk>2015-03-09 13:10:32 +0000
committerSteve Kemp <steve@steve.org.uk>2015-03-09 13:10:32 +0000
commit1ce0906b3480702085d4596dbb4758c115ab298f (patch)
tree695cd365c2ff73904328a049f3b9cfcc5a0a1abd /lib/custodian/util/timespan.rb
parent891b720013f06f092f6be82adad95e5551c696b6 (diff)
Don't use parenthesis aroudn conditions in an if.
Diffstat (limited to 'lib/custodian/util/timespan.rb')
-rw-r--r--lib/custodian/util/timespan.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/custodian/util/timespan.rb b/lib/custodian/util/timespan.rb
index 5340c65..b3cb647 100644
--- a/lib/custodian/util/timespan.rb
+++ b/lib/custodian/util/timespan.rb
@@ -17,15 +17,15 @@ module Custodian
#
# Handle PM times.
#
- if ( ( desc.kind_of? String ) &&
- ( desc =~ /([0-9]+)pm$/i ) )
+ if ( desc.kind_of? String ) &&
+ ( desc =~ /([0-9]+)pm$/i )
desc = $1.dup.to_i + 12;
end
#
# Handle AM times.
#
- if ( desc.kind_of? String )
+ if desc.kind_of? String
desc = desc.sub( /am$/, '' )
desc = desc.to_i
end
@@ -70,7 +70,7 @@ module Custodian
while( hour != p_end )
valid[hour] = 1
hour += 1
- hour = 0 if ( hour > 23 )
+ hour = 0 if hour > 23
end
valid[p_end]=1
@@ -92,7 +92,7 @@ module Custodian
#
# Default to the current hour, if not specified.
#
- if ( cur_hour.nil? )
+ if cur_hour.nil?
cur_hour = Time.now.hour
end