class Nessus::Scan::Result
Attributes
raw[R]
Public Class Methods
new(raw)
click to toggle source
# File lib/nessus/scan.rb, line 102 def initialize(raw) @raw = raw end
Public Instance Methods
critical?()
click to toggle source
# File lib/nessus/scan.rb, line 106 def critical? check('critical') end
high?()
click to toggle source
# File lib/nessus/scan.rb, line 110 def high? check('high') end
medium?()
click to toggle source
# File lib/nessus/scan.rb, line 114 def medium? check('medium') end
Private Instance Methods
check(severity)
click to toggle source
# File lib/nessus/scan.rb, line 120 def check(severity) raw['hosts'].any? { |h| h.fetch(severity) > 0 } end