Method: RuboCop::Formatter::HTMLFormatter::ERBContext#render_css

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

#render_cssObject



126
127
128
129
130
131
132
133
# File 'lib/rubocop/formatter/html_formatter.rb', line 126

def render_css
  context = CSSContext.new
  template = File.read(CSS_PATH, encoding: Encoding::UTF_8)
  erb = ERB.new(template, trim_mode: '-')
  erb.result(context.binding).lines.map do |line|
    line == "\n" ? line : "      #{line}"
  end.join
end