class CC::Analyzer::Formatters::HTMLFormatter::ReportTemplate

Constants

TEMPLATE_PATH

Attributes

filesystem[R]
issues[R]

Public Class Methods

new(issues, filesystem) click to toggle source
# File lib/cc/analyzer/formatters/html_formatter.rb, line 360
def initialize(issues, filesystem)
  @issues = issues
  @filesystem = filesystem
end

Public Instance Methods

param(str) click to toggle source
# File lib/cc/analyzer/formatters/html_formatter.rb, line 374
def param(str)
  str.downcase.gsub(/\s+/, "-")
end
params(values) click to toggle source
# File lib/cc/analyzer/formatters/html_formatter.rb, line 378
def params(values)
  values.map { |c| param c }.join(" ")
end
project_name() click to toggle source
# File lib/cc/analyzer/formatters/html_formatter.rb, line 370
def project_name
  File.basename(filesystem.root)
end
render() click to toggle source
# File lib/cc/analyzer/formatters/html_formatter.rb, line 365
def render
  template = File.read(TEMPLATE_PATH)
  ERB.new(template, trim_mode: "-").result(binding)
end