Class: Diogenes::Validate::Issue
- Inherits:
-
Struct
- Object
- Struct
- Diogenes::Validate::Issue
- Defined in:
- lib/diogenes/validate/issue.rb
Instance Attribute Summary collapse
-
#file ⇒ Object
Returns the value of attribute file.
-
#message ⇒ Object
Returns the value of attribute message.
-
#severity ⇒ Object
Returns the value of attribute severity.
Instance Method Summary collapse
-
#error? ⇒ Boolean
: () -> bool.
-
#to_s ⇒ Object
: () -> String.
-
#warning? ⇒ Boolean
: () -> bool.
Instance Attribute Details
#file ⇒ Object
Returns the value of attribute file
6 7 8 |
# File 'lib/diogenes/validate/issue.rb', line 6 def file @file end |
#message ⇒ Object
Returns the value of attribute message
6 7 8 |
# File 'lib/diogenes/validate/issue.rb', line 6 def @message end |
#severity ⇒ Object
Returns the value of attribute severity
6 7 8 |
# File 'lib/diogenes/validate/issue.rb', line 6 def severity @severity end |
Instance Method Details
#error? ⇒ Boolean
: () -> bool
8 |
# File 'lib/diogenes/validate/issue.rb', line 8 def error? = severity == :error |
#to_s ⇒ Object
: () -> String
14 15 16 17 |
# File 'lib/diogenes/validate/issue.rb', line 14 def to_s tag = error? ? "ERROR" : " WARN" file ? " #{tag} #{file} — #{}" : " #{tag} #{}" end |
#warning? ⇒ Boolean
: () -> bool
11 |
# File 'lib/diogenes/validate/issue.rb', line 11 def warning? = severity == :warning |