Class: Ea::Lint::Offense
- Inherits:
-
Struct
- Object
- Struct
- Ea::Lint::Offense
- Defined in:
- lib/ea/lint/offense.rb
Overview
One lint offense. Carries rule name, severity, entity id/name, and a human-readable message.
Instance Attribute Summary collapse
-
#entity_id ⇒ Object
Returns the value of attribute entity_id.
-
#entity_name ⇒ Object
Returns the value of attribute entity_name.
-
#message ⇒ Object
Returns the value of attribute message.
-
#rule ⇒ Object
Returns the value of attribute rule.
-
#severity ⇒ Object
Returns the value of attribute severity.
Instance Method Summary collapse
Instance Attribute Details
#entity_id ⇒ Object
Returns the value of attribute entity_id
7 8 9 |
# File 'lib/ea/lint/offense.rb', line 7 def entity_id @entity_id end |
#entity_name ⇒ Object
Returns the value of attribute entity_name
7 8 9 |
# File 'lib/ea/lint/offense.rb', line 7 def entity_name @entity_name end |
#message ⇒ Object
Returns the value of attribute message
7 8 9 |
# File 'lib/ea/lint/offense.rb', line 7 def @message end |
#rule ⇒ Object
Returns the value of attribute rule
7 8 9 |
# File 'lib/ea/lint/offense.rb', line 7 def rule @rule end |
#severity ⇒ Object
Returns the value of attribute severity
7 8 9 |
# File 'lib/ea/lint/offense.rb', line 7 def severity @severity end |
Instance Method Details
#error? ⇒ Boolean
9 10 11 |
# File 'lib/ea/lint/offense.rb', line 9 def error? severity == :error end |
#warning? ⇒ Boolean
13 14 15 |
# File 'lib/ea/lint/offense.rb', line 13 def warning? severity == :warning end |