class ActionView::SyntaxErrorInTemplate

:nodoc:

def annotated_source_code

def annotated_source_code
  @offending_code_string.split("\n").map.with_index(1) { |line, index|
    indentation = " " * 4
    "#{index}:#{indentation}#{line}"
  }
end

def initialize(template, offending_code_string)

:nodoc:
def initialize(template, offending_code_string)
  @offending_code_string = offending_code_string
  super(template)
end

def message

def message
  <<~MESSAGE
    Encountered a syntax error while rendering template: check #{@offending_code_string}
  MESSAGE
end