enum

Ameba::Severity

Inherits Enum < Comparable < Value < Object

Constants

Error = 0
Warning = 1
Convention = 2

Class methods

parse(name : String)

Creates Severity by the name.

Severity.parse("convention") # => Severity::Convention
Severity.parse("foo-bar")    # => Exception: Incorrect severity name
Source

Instance methods

color

Returns a color uniquely indicating severity.

Severity::Warning.color # => Colorize::ColorANSI::Red
Source
convention?

Returns true if this enum value equals Convention

Source
error?

Returns true if this enum value equals Error

Source
symbol

Returns a symbol uniquely indicating severity.

Severity::Warning.symbol # => 'W'
Source
warning?

Returns true if this enum value equals Warning

Source