Class: Arachni::Issue::Severity::Base

Inherits:
Object
  • Object
show all
Includes:
Comparable
Defined in:
lib/arachni/issue/severity/base.rb

Overview

Represents an Arachni::Issue's severity.

Author:

Instance Method Summary collapse

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_sObject



32
33
34
# File 'lib/arachni/issue/severity/base.rb', line 32

def to_s
    @severity.to_s
end

#to_symObject



28
29
30
# File 'lib/arachni/issue/severity/base.rb', line 28

def to_sym
    @severity
end