Class: RuleSeverity

Inherits:
Object
  • Object
show all
Defined in:
lib/audit/lib/benchmark/rule_severity.rb

Constant Summary collapse

UNKNOWN =
"unknown"
INFO =
"info"
LOW =
"low"
MEDIUM =
"medium"
HIGH =
"high"
SEVERITIES =
[UNKNOWN, INFO, LOW, MEDIUM, HIGH]

Class Method Summary collapse

Class Method Details

.parse(str) ⇒ Object



10
11
12
# File 'lib/audit/lib/benchmark/rule_severity.rb', line 10

def self.parse(str)
	return ((SEVERITIES.include? str.downcase) ? str.downcase : UNKNOWN)
end