diff options
author | Wild Kat <wk@futureinquestion.net> | 2018-04-08 00:35:47 +0200 |
---|---|---|
committer | Wild Kat <wk@futureinquestion.net> | 2018-04-08 00:35:47 +0200 |
commit | a4bd3e5ca5ab747fdbf2bd876d7be7a947e74f46 (patch) | |
tree | 58d52f9b948ee41efad470b6a053fcd6b15241d7 /lib/oxidized/model/powerconnect.rb | |
parent | 5c8916a364cf999a420ebbd5e022ec8cda78a980 (diff) |
eliminate inverse methods from models
Diffstat (limited to 'lib/oxidized/model/powerconnect.rb')
-rw-r--r-- | lib/oxidized/model/powerconnect.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/oxidized/model/powerconnect.rb b/lib/oxidized/model/powerconnect.rb index f602a36..ca91e60 100644 --- a/lib/oxidized/model/powerconnect.rb +++ b/lib/oxidized/model/powerconnect.rb @@ -22,7 +22,7 @@ class PowerConnect < Oxidized::Model if (@stackable.nil?) @stackable = true if cfg.match /(U|u)nit\s/ end - cfg = cfg.split("\n").select { |line| not line[/Up\sTime/] } + cfg = cfg.split("\n").reject { |line| line[/Up\sTime/] } comment cfg.join("\n") + "\n" end @@ -72,7 +72,7 @@ class PowerConnect < Oxidized::Model end out << line.strip end - out = out.select { |line| not line[/Up\sTime/] } + out = out.reject { |line| line[/Up\sTime/] } out = comment out.join "\n" out << "\n" end |