Class: XCActivityLog::IDEActivityLogSection::Severity
- Inherits:
-
Object
- Object
- XCActivityLog::IDEActivityLogSection::Severity
- Includes:
- Comparable
- Defined in:
- lib/xcactivitylog/objects.rb
Constant Summary collapse
- SUCCESS =
new(0)
- WARNING =
new(1)
- ERROR =
new(2)
- TEST_FAILURE =
new(3)
Instance Method Summary collapse
- #<=>(other) ⇒ Object
-
#initialize(severity) ⇒ Severity
constructor
A new instance of Severity.
- #to_s ⇒ Object
Constructor Details
#initialize(severity) ⇒ Severity
Returns a new instance of Severity.
57 58 59 60 |
# File 'lib/xcactivitylog/objects.rb', line 57 def initialize(severity) @severity = severity freeze end |
Instance Method Details
#<=>(other) ⇒ Object
84 85 86 |
# File 'lib/xcactivitylog/objects.rb', line 84 def <=>(other) severity <=> other.severity end |
#to_s ⇒ Object
67 68 69 70 71 72 73 74 75 76 77 78 79 80 |
# File 'lib/xcactivitylog/objects.rb', line 67 def to_s case severity when 0 'Success' when 1 'Warning' when 2 'Error' when 3 'Test Failure' else "Unknown (#{severity})" end end |