From 6708cf6840376ede02c645749a2627f13255662b Mon Sep 17 00:00:00 2001 From: Daniel Preussker Date: Mon, 13 Jun 2016 12:30:45 +0000 Subject: Update quanta.rb Updated match lines --- lib/oxidized/model/quanta.rb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'lib/oxidized/model/quanta.rb') diff --git a/lib/oxidized/model/quanta.rb b/lib/oxidized/model/quanta.rb index 870b772..339c2d7 100644 --- a/lib/oxidized/model/quanta.rb +++ b/lib/oxidized/model/quanta.rb @@ -2,13 +2,13 @@ class Quanta < Oxidized::Model prompt /^\((\w|\S)+\) (>|#)$/ comment '! ' + cmd 'show run' do |cfg| - cfg = cfg.each_line.select { |line| not line.match /^!.*$/ } - cfg = cfg.join - cfg = cfg.each_line.select { |line| not line.match /^\((\w|\S)+\) (>|#)$/ } - cfg = cfg.join - cfg = cfg.each_line.select { |line| not line.match /^show run$/ } - cfg = cfg.join + cfg.each_line.select do |line| + not line.match /^!.*$/ and + not line.match /^\((\w|\S)+\) (>|#)$/ and + not line.match /^show run$/ + end.join end cfg :telnet do -- cgit v1.2.1