Class: Arachni::Issue::Severity::Base
- Includes:
- Comparable
- Defined in:
- lib/arachni/issue/severity/base.rb
Overview
Represents an Arachni::Issue's severity.
Instance Method Summary collapse
- #<=>(other) ⇒ Object
-
#initialize(severity) ⇒ Base
constructor
A new instance of Base.
- #to_s ⇒ Object
- #to_sym ⇒ Object
Constructor Details
#initialize(severity) ⇒ Base
Returns a new instance of Base.
20 21 22 |
# File 'lib/arachni/issue/severity/base.rb', line 20 def initialize( severity ) @severity = severity.to_s.downcase.to_sym end |
Instance Method Details
#<=>(other) ⇒ Object
24 25 26 |
# File 'lib/arachni/issue/severity/base.rb', line 24 def <=>( other ) ORDER.rindex( other.to_sym ) <=> ORDER.rindex( to_sym ) end |
#to_s ⇒ Object
32 33 34 |
# File 'lib/arachni/issue/severity/base.rb', line 32 def to_s @severity.to_s end |
#to_sym ⇒ Object
28 29 30 |
# File 'lib/arachni/issue/severity/base.rb', line 28 def to_sym @severity end |