Class: LicenseFinder::ErbReport

Inherits:
Report
  • Object
show all
Defined in:
lib/license_finder/reports/erb_report.rb

Direct Known Subclasses

HtmlReport, JunitReport, MarkdownReport, XmlReport

Constant Summary collapse

TEMPLATE_PATH =
ROOT_PATH.join('reports', 'templates')

Instance Method Summary collapse

Methods inherited from Report

#initialize, of

Constructor Details

This class inherits a constructor from LicenseFinder::Report

Instance Method Details

#to_s(filename = TEMPLATE_PATH.join("#{template_name}.erb")) ⇒ Object



7
8
9
10
# File 'lib/license_finder/reports/erb_report.rb', line 7

def to_s(filename = TEMPLATE_PATH.join("#{template_name}.erb"))
  template = ERB.new(filename.read, nil, '-')
  template.result(binding)
end