Class: Prism::Translation::Parser::PrismDiagnostic
- Inherits:
-
Diagnostic
- Object
- Prism::Translation::Parser::PrismDiagnostic
- Defined in:
- lib/prism/translation/parser.rb
Overview
The parser gem has a list of diagnostics with a hard-coded set of error messages. We create our own diagnostic class in order to set our own error messages.
Instance Attribute Summary collapse
-
#message ⇒ Object
readonly
This is the cached message coming from prism.
Instance Method Summary collapse
-
#initialize(message, level, reason, location) ⇒ PrismDiagnostic
constructor
Initialize a new diagnostic with the given message and location.
Constructor Details
#initialize(message, level, reason, location) ⇒ PrismDiagnostic
Initialize a new diagnostic with the given message and location.
28 29 30 31 |
# File 'lib/prism/translation/parser.rb', line 28 def initialize(, level, reason, location) @message = super(level, reason, {}, location, []) end |
Instance Attribute Details
#message ⇒ Object (readonly)
This is the cached message coming from prism.
25 26 27 |
# File 'lib/prism/translation/parser.rb', line 25 def @message end |