Class: Benedictus::Heuristics::Warning
- Inherits:
-
Struct
- Object
- Struct
- Benedictus::Heuristics::Warning
- Defined in:
- lib/benedictus/heuristics/warning.rb
Instance Attribute Summary collapse
-
#code ⇒ Object
Returns the value of attribute code.
-
#message ⇒ Object
Returns the value of attribute message.
-
#severity ⇒ Object
Returns the value of attribute severity.
-
#suggestion ⇒ Object
Returns the value of attribute suggestion.
Instance Method Summary collapse
-
#initialize ⇒ Warning
constructor
A new instance of Warning.
Constructor Details
#initialize ⇒ Warning
Returns a new instance of Warning.
8 9 10 11 12 13 |
# File 'lib/benedictus/heuristics/warning.rb', line 8 def initialize(*) super return if WARNING_SEVERITIES.include?(severity) raise ArgumentError, "severity must be one of #{WARNING_SEVERITIES.inspect}" end |
Instance Attribute Details
#code ⇒ Object
Returns the value of attribute code
7 8 9 |
# File 'lib/benedictus/heuristics/warning.rb', line 7 def code @code end |
#message ⇒ Object
Returns the value of attribute message
7 8 9 |
# File 'lib/benedictus/heuristics/warning.rb', line 7 def @message end |
#severity ⇒ Object
Returns the value of attribute severity
7 8 9 |
# File 'lib/benedictus/heuristics/warning.rb', line 7 def severity @severity end |
#suggestion ⇒ Object
Returns the value of attribute suggestion
7 8 9 |
# File 'lib/benedictus/heuristics/warning.rb', line 7 def suggestion @suggestion end |