class Fixnum

Public Instance Methods

blank?() click to toggle source

Return false if the integer does NOT equal zero @return [Boolean]

Return true is count does NOT equal zero

@example

host.event_count.blank? #=> false
# File lib/nessus/core_ext/helpers.rb, line 8
def blank?
  if (self.zero?)
    return true
  else
    return false
  end
end
critical?() click to toggle source

Return True if the given severity is critical @return [Boolean]

Return True if the given severity is critical

@example

host.severity.critical? #=> true
# File lib/nessus/core_ext/helpers.rb, line 80
def critical?
  if self == 4
    true
  else
    false
  end
end
high?() click to toggle source

Return True if the given severity is high @return [Boolean]

Return True if the given severity is high

@example

host.severity.high? #=> true
# File lib/nessus/core_ext/helpers.rb, line 41
def high?
  if self == 3
    true
  else
    false
  end
end
in_words() click to toggle source

Return a severity integer in words. @return [String]

Return a severity integer in words.

@example

event.severity.in_words #=> "High Severity"
# File lib/nessus/core_ext/helpers.rb, line 21
def in_words
  case self
  when 0
    return "Informational Severity"
  when 1
    return "Low Severity"
  when 2
    return "Medium Severity"
  when 3
    return "High Severity"
  when 4
    return "Critical Severity"
  end
end
low?() click to toggle source

Return True if the given severity is low @return [Boolean]

Return True if the given severity is low

@example

host.severity.low? #=> true
# File lib/nessus/core_ext/helpers.rb, line 67
def low?
  if self >= 1
    true
  else
    false
  end
end
medium?() click to toggle source

Return True if the given severity is medium @return [Boolean]

Return True if the given severity is medium

@example

host.severity.medium? #=> true
# File lib/nessus/core_ext/helpers.rb, line 54
def medium?
  if self == 2
    true
  else
    false
  end
end