class ActionView::SyntaxErrorInTemplate

Public Class Methods

new(template, offending_code_string) click to toggle source
Calls superclass method
# File lib/action_view/template/error.rb, line 138
def initialize(template, offending_code_string)
  @offending_code_string = offending_code_string
  super(template)
end

Public Instance Methods

annotated_source_code() click to toggle source
# File lib/action_view/template/error.rb, line 149
def annotated_source_code
  @offending_code_string.split("\n").map.with_index(1) { |line, index|
    indentation = " " * 4
    "#{index}:#{indentation}#{line}"
  }
end
message() click to toggle source
# File lib/action_view/template/error.rb, line 143
    def message
      <<~MESSAGE
        Encountered a syntax error while rendering template: check #{@offending_code_string}
      MESSAGE
    end