Class: Udb::LogLevel
- Inherits:
-
T::Enum
- Object
- T::Enum
- Udb::LogLevel
- Includes:
- Comparable
- Defined in:
- lib/udb/log.rb
Instance Method Summary collapse
Instance Method Details
#<=>(other) ⇒ Object
40 41 42 43 44 |
# File 'lib/udb/log.rb', line 40 def <=>(other) return nil unless other.is_a?(LogLevel) rank <=> other.rank end |
#rank ⇒ Object
28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/udb/log.rb', line 28 def rank case self when Debug then 5 when Info then 4 when Warn then 3 when Error then 2 when Fatal then 1 else T.absurd(self) end end |