Class: Aireos

Inherits:
Oxidized::Model show all
Defined in:
lib/oxidized/model/aireos.rb

Instance Attribute Summary

Attributes inherited from Oxidized::Model

#input, #node

Instance Method Summary collapse

Methods inherited from Oxidized::Model

cfg, #cfg, cfgs, cmd, #cmd, cmds, comment, #comment, expect, #expect, expects, #expects, #get, inherited, #output, post, pre, prompt, #prompt, #screenscrape, #send

Methods included from Oxidized::Config::Vars

#vars

Instance Method Details

#clean(cfg) ⇒ Object



42
43
44
45
46
47
48
49
50
51
52
53
# File 'lib/oxidized/model/aireos.rb', line 42

def clean(cfg)
  out = []
  cfg.each_line do |line|
    next if line =~ /^\s*$/
    next if line =~ /rogue (adhoc|client) (alert|Unknown) [\da-f]{2}:/

    line = line[1..-1] if line[0] == "\r"
    out << line.strip
  end
  out = out.join "\n"
  out << "\n"
end