diff options
author | Daniel Preussker <f0o@users.noreply.github.com> | 2016-06-13 12:30:45 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-06-13 12:30:45 +0000 |
commit | 6708cf6840376ede02c645749a2627f13255662b (patch) | |
tree | fdded35124a636d67cfb88b677c632e463ce2f03 /lib | |
parent | 275e72ad7060c059916b61d738138981727afb4c (diff) |
Update quanta.rb
Updated match lines
Diffstat (limited to 'lib')
-rw-r--r-- | lib/oxidized/model/quanta.rb | 12 |
1 files changed, 6 insertions, 6 deletions
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 |