From 21e3d6490496573f25ef77fe8172766ac7d1a736 Mon Sep 17 00:00:00 2001 From: Wild Kat Date: Sat, 21 Apr 2018 13:27:05 +0200 Subject: the great makeover - standardize layout, alignment, indentation --- lib/oxidized/model/hatteras.rb | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'lib/oxidized/model/hatteras.rb') diff --git a/lib/oxidized/model/hatteras.rb b/lib/oxidized/model/hatteras.rb index 4192cbc..7341cc4 100644 --- a/lib/oxidized/model/hatteras.rb +++ b/lib/oxidized/model/hatteras.rb @@ -9,7 +9,6 @@ class Hatteras < Oxidized::Model data.sub re, '' end - cmd :secret do |cfg| cfg.gsub! /^(community) \S+/, '\\1 ""' cfg.gsub! /^(communityString) "\S+"/, '\\1 ""' @@ -22,14 +21,18 @@ class Hatteras < Oxidized::Model end cmd "show switch\r" do |cfg| - cfg = cfg.each_line.reject { |line| line.match /Switch uptime|Switch temperature|Last reset reason/ or - line.match /TermCpuUtil|^\s+\^$|ERROR: Bad command/ }.join + cfg = cfg.each_line.reject { |line| + line.match /Switch uptime|Switch temperature|Last reset reason/ or + line.match /TermCpuUtil|^\s+\^$|ERROR: Bad command/ + } .join comment cfg end cmd "show card\r" do |cfg| - cfg = cfg.each_line.reject { |line| line.match /Card uptime|Card temperature|Last reset reason/ or - line.match /TermCpuUtil|^\s+\^$|ERROR: Bad command/ }.join + cfg = cfg.each_line.reject { |line| + line.match /Card uptime|Card temperature|Last reset reason/ or + line.match /TermCpuUtil|^\s+\^$|ERROR: Bad command/ + } .join comment cfg end -- cgit v1.2.1