You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: erb_formatter.rb
    path of file: ./repos/rufo/lib/rufo
    
    the code of the file until where you have to start completion: # frozen_string_literal: true
require "erb"

class CustomScanner < ERB::Compiler::TrimScanner
  def initialize(src)
    super(src,
    
  def format_affix(affix, levels, type)
    string = ""
    case type
    when :prefix
      count = 0
      while count < levels
        count += 1
        string += (" " * Rufo::Formatter::INDENT_SIZE * (count > 0 ? count - 1 : 0)) + affix
        string += "\n" if count < levels
      end