Ameba::Severity - ameba 1.7.0

# enum Ameba::Severity

##
Defined in:

ameba/severity.cr

##
Enum 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?

  Returns `true` if this enum value equals `Convention`

- #error?

  Returns `true` if this enum value equals `Error`

- #symbol : Char

  Returns a symbol uniquely indicating severity.

- #warning?

  Returns `true` if this enum value equals `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 convention? #

Returns `true` if this enum value equals `Convention`

def error? #

Returns `true` if this enum value equals `Error`

def symbol : Char #

Returns a symbol uniquely indicating severity.

    Severity::Warning.symbol # => 'W'

def warning? #

Returns `true` if this enum value equals `Warning`