class Prism::Translation::Parser::Diagnostic

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.



The message generated by prism.

Public Class Methods

new(message, level, reason, location) click to toggle source

Initialize a new diagnostic with the given message and location.

Calls superclass method
# File lib/prism/translation/parser.rb, line 20
def initialize(message, level, reason, location)
  @message = message
  super(level, reason, {}, location, [])