diff options
author | Adam Winberg <adam.winberg@smhi.se> | 2016-05-27 13:05:19 +0200 |
---|---|---|
committer | Adam Winberg <adam.winberg@smhi.se> | 2016-05-27 13:05:19 +0200 |
commit | 71290cf4f0b866557fe0f87bbace898fdc1c2ca3 (patch) | |
tree | 612a5d6cee2fbc3b227f6390bc294abcdf0f56d5 /lib | |
parent | 51f4c2d0ba810c97000c3f5db37b198938683c13 (diff) |
Use better variable declaration
Diffstat (limited to 'lib')
-rw-r--r-- | lib/oxidized/jobs.rb | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/oxidized/jobs.rb b/lib/oxidized/jobs.rb index 719bda9..b61a54d 100644 --- a/lib/oxidized/jobs.rb +++ b/lib/oxidized/jobs.rb @@ -8,8 +8,7 @@ module Oxidized @max = max # Set interval to 1 if interval is 0 (=disabled) so we don't break # the 'ceil' function - @interval = 1 if @interval == 0 - @interval = interval + @interval = @interval == 0 ? 1 : interval @nodes = nodes @last = Time.now.utc @durations = Array.new @nodes.size, AVERAGE_DURATION |