Class: LibRubyParser::Diagnostic
- Inherits:
-
Object
- Object
- LibRubyParser::Diagnostic
- Defined in:
- lib/lib-ruby-parser.rb
Overview
Diagnostic message that comes from the parser when there’s an error or warning
Instance Attribute Summary collapse
-
#level ⇒ Symbol
Level of the diagnostic (+:error+ or +:warning+).
-
#loc ⇒ Loc
Location of the diagnostic.
-
#message ⇒ DiagnosticMessage
Message of the diagnostic.
Instance Method Summary collapse
-
#initialize(level:, message:, loc:) ⇒ Diagnostic
constructor
A new instance of Diagnostic.
Constructor Details
#initialize(level:, message:, loc:) ⇒ Diagnostic
Returns a new instance of Diagnostic.
91 92 93 94 95 |
# File 'lib/lib-ruby-parser.rb', line 91 def initialize(level:, message:, loc:) @level = level @message = @loc = loc end |
Instance Attribute Details
#level ⇒ Symbol
Level of the diagnostic (+:error+ or +:warning+)
76 77 78 |
# File 'lib/lib-ruby-parser.rb', line 76 def level @level end |
#loc ⇒ Loc
Location of the diagnostic
86 87 88 |
# File 'lib/lib-ruby-parser.rb', line 86 def loc @loc end |
#message ⇒ DiagnosticMessage
Message of the diagnostic
81 82 83 |
# File 'lib/lib-ruby-parser.rb', line 81 def @message end |