class RuboCop::Formatter::HTMLFormatter

def render_html

def render_html
  context = ERBContext.new(files, summary)
  template = File.read(TEMPLATE_PATH, encoding: Encoding::UTF_8)
  # The following condition is workaround for until Ruby 2.6 is released.
  # https://github.com/ruby/ruby/commit/cc777d09f44fa909a336ba14f3aa802ffe16e010
  erb = if RUBY_VERSION >= '2.6'
          ERB.new(template, trim_mode: '-')
        else
          ERB.new(template, nil, '-')
        end
  html = erb.result(context.binding)
  output.write html
end