diff options
author | Steve Kemp <steve@steve.org.uk> | 2015-03-09 13:10:32 +0000 |
---|---|---|
committer | Steve Kemp <steve@steve.org.uk> | 2015-03-09 13:10:32 +0000 |
commit | 1ce0906b3480702085d4596dbb4758c115ab298f (patch) | |
tree | 695cd365c2ff73904328a049f3b9cfcc5a0a1abd /lib/custodian/settings.rb | |
parent | 891b720013f06f092f6be82adad95e5551c696b6 (diff) |
Don't use parenthesis aroudn conditions in an if.
Diffstat (limited to 'lib/custodian/settings.rb')
-rw-r--r-- | lib/custodian/settings.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/custodian/settings.rb b/lib/custodian/settings.rb index e0d2d27..1739495 100644 --- a/lib/custodian/settings.rb +++ b/lib/custodian/settings.rb @@ -49,8 +49,8 @@ module Custodian # Load and "parse" the key=value content. # File.open( file, "r" ).each_line do |line| - next if ( line.nil? || line =~ /^#/ ) - if ( line =~ /^(.*)=(.*)$/ ) + next if line.nil? || line =~ /^#/ + if line =~ /^(.*)=(.*)$/ key = $1.dup val = $2.dup key.strip! @@ -95,7 +95,7 @@ module Custodian def timeout _load unless( _loaded? ) - if ( @settings['timeout'] ) + if @settings['timeout'] @settings['timeout'].to_i else 30 @@ -111,7 +111,7 @@ module Custodian def retries _load unless( _loaded? ) - if ( @settings['retries'] ) + if @settings['retries'] @settings['retries'].to_i else 5 @@ -131,7 +131,7 @@ module Custodian def retry_delay _load unless( _loaded? ) - if ( @settings['retry_delay'] ) + if @settings['retry_delay'] @settings['retry_delay'].to_i else 0 @@ -202,7 +202,7 @@ module Custodian # Find the alerting method. # # if we have something setup then use it. - if ( @settings["#{alert}_target"] ) + if @settings["#{alert}_target"] return( @settings["#{alert}_target"] ) end |