Method: RuboCop::Formatter::HTMLFormatter#render_html

Defined in:
lib/rubocop/formatter/html_formatter.rb

#render_htmlObject



39
40
41
42
43
44
45
46
47
# File 'lib/rubocop/formatter/html_formatter.rb', line 39

def render_html
  context = ERBContext.new(files, summary)

  template = File.read(TEMPLATE_PATH, encoding: Encoding::UTF_8)
  erb = ERB.new(template, nil, '-')
  html = erb.result(context.binding)

  output.write html
end