Class: AsciiChem::Linter::Diagnostic
- Inherits:
-
Struct
- Object
- Struct
- AsciiChem::Linter::Diagnostic
- Defined in:
- lib/asciichem/linter/diagnostic.rb
Instance Attribute Summary collapse
-
#message ⇒ Object
Returns the value of attribute message.
-
#node ⇒ Object
Returns the value of attribute node.
-
#severity ⇒ Object
Returns the value of attribute severity.
Instance Method Summary collapse
Instance Attribute Details
#message ⇒ Object
Returns the value of attribute message
5 6 7 |
# File 'lib/asciichem/linter/diagnostic.rb', line 5 def @message end |
#node ⇒ Object
Returns the value of attribute node
5 6 7 |
# File 'lib/asciichem/linter/diagnostic.rb', line 5 def node @node end |
#severity ⇒ Object
Returns the value of attribute severity
5 6 7 |
# File 'lib/asciichem/linter/diagnostic.rb', line 5 def severity @severity end |
Instance Method Details
#to_s ⇒ Object
6 7 8 9 10 11 12 13 |
# File 'lib/asciichem/linter/diagnostic.rb', line 6 def to_s context = node&.diagnostic_label if context "[#{severity}] #{context}: #{}" else "[#{severity}] #{}" end end |