enum Ameba::Severity
Defined in:
ameba/severity.crEnum Members
-
Error =
0
-
Warning =
1
-
Convention =
2
Class Method Summary
-
.parse(name : String)
Creates Severity by the name.
Instance Method Summary
-
#color : Colorize::Color
Returns a color uniquely indicating severity.
- #convention?
- #error?
-
#symbol : Char
Returns a symbol uniquely indicating severity.
- #warning?
Class Method Detail
def self.parse(name : String)
#
Creates Severity by the name.
Severity.parse("convention") # => Severity::Convention
Severity.parse("foo-bar") # => Exception: Incorrect severity name
Instance Method Detail
def color : Colorize::Color
#
Returns a color uniquely indicating severity.
Severity::Warning.color # => Colorize::ColorANSI::Red
def symbol : Char
#
Returns a symbol uniquely indicating severity.
Severity::Warning.symbol # => 'W'