Class: Prism::Translation::Parser::PrismDiagnostic
Relationships & Source Files | |
Inherits: |
Prism::Translation::Parser::Diagnostic
|
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.
Class Method Summary
-
.new(message, level, reason, location) ⇒ PrismDiagnostic
constructor
Initialize a new diagnostic with the given message and location.
Instance Attribute Summary
-
#message
readonly
This is the cached message coming from prism.
Constructor Details
.new(message, level, reason, location) ⇒ PrismDiagnostic
Initialize a new diagnostic with the given message and location.
# File 'lib/prism/translation/parser.rb', line 28
def initialize(, level, reason, location) @message = super(level, reason, {}, location, []) end
Instance Attribute Details
#message (readonly)
This is the cached message coming from prism.
# File 'lib/prism/translation/parser.rb', line 25
attr_reader :