summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Preussker <f0o@users.noreply.github.com>2016-06-13 12:30:45 +0000
committerGitHub <noreply@github.com>2016-06-13 12:30:45 +0000
commit6708cf6840376ede02c645749a2627f13255662b (patch)
treefdded35124a636d67cfb88b677c632e463ce2f03
parent275e72ad7060c059916b61d738138981727afb4c (diff)
Update quanta.rb
Updated match lines
-rw-r--r--lib/oxidized/model/quanta.rb12
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