class Rails::BacktraceCleaner

def initialize

def initialize
  super
  @root = "#{Rails.root}/"
  add_filter do |line|
    line.start_with?(@root) ? line.from(@root.size) : line
  end
  add_filter do |line|
    if RENDER_TEMPLATE_PATTERN.match?(line)
      line.sub(RENDER_TEMPLATE_PATTERN, "")
    else
      line
    end
  end
  add_silencer { |line| !APP_DIRS_PATTERN.match?(line) }
end