From 40ee9bae8ccb010dc1449504776fbc9392b58ab0 Mon Sep 17 00:00:00 2001 From: Clif Cox Date: Wed, 19 Feb 2025 14:38:13 -0800 Subject: [PATCH] Use cut_tail instad of more wordy way. --- lib/oxidized/model/powerconnect.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/oxidized/model/powerconnect.rb b/lib/oxidized/model/powerconnect.rb index 8ca23e682..ca5854843 100644 --- a/lib/oxidized/model/powerconnect.rb +++ b/lib/oxidized/model/powerconnect.rb @@ -13,7 +13,7 @@ class PowerConnect < Oxidized::Model # Filter all command output cmd :all do |cfg| cfg.gsub! /\r+/, '' # Remove the CR characters echoed back from the commands - cfg.each_line.to_a[1..-2].join # Drop the last line which is the next prompt + cfg.cut_tail # Drop the last line which is the next prompt end cmd :secret do |cfg|