Class: Semlogr::LogSeverity
- Inherits:
-
Object
- Object
- Semlogr::LogSeverity
- Includes:
- Comparable
- Defined in:
- lib/semlogr/log_severity.rb
Constant Summary collapse
- DEBUG =
LogSeverity.new(::Logger::DEBUG, 'DEBUG')
- INFO =
LogSeverity.new(::Logger::INFO, 'INFO')
- WARN =
LogSeverity.new(::Logger::WARN, 'WARN')
- ERROR =
LogSeverity.new(::Logger::ERROR, 'ERROR')
- FATAL =
LogSeverity.new(::Logger::FATAL, 'FATAL')
Instance Attribute Summary collapse
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
- #<=>(other) ⇒ Object
-
#initialize(value, display_string) ⇒ LogSeverity
constructor
A new instance of LogSeverity.
- #to_s ⇒ Object
Constructor Details
#initialize(value, display_string) ⇒ LogSeverity
Returns a new instance of LogSeverity.
7 8 9 10 |
# File 'lib/semlogr/log_severity.rb', line 7 def initialize(value, display_string) @value = value @display_string = display_string end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
5 6 7 |
# File 'lib/semlogr/log_severity.rb', line 5 def value @value end |
Instance Method Details
#<=>(other) ⇒ Object
12 13 14 |
# File 'lib/semlogr/log_severity.rb', line 12 def <=>(other) @value <=> other.value end |
#to_s ⇒ Object
16 17 18 |
# File 'lib/semlogr/log_severity.rb', line 16 def to_s @display_string end |