Class: Dragnet::Exporters::HTMLExporter
- Includes:
- Helpers::RepositoryHelper
- Defined in:
- lib/dragnet/exporters/html_exporter.rb
Overview
Creates an HTML report from the given Test Records and Errors data.
Constant Summary collapse
- TEMPLATE =
File.join(__dir__, 'templates', 'template.html.erb').freeze
Instance Attribute Summary
Attributes inherited from Exporter
#errors, #logger, #repository, #test_records
Instance Method Summary collapse
-
#export ⇒ String
Generates the report and returns it as a string.
Methods included from Helpers::RepositoryHelper
#relative_to_repo, #repo_base, #shorten_sha1
Methods inherited from Exporter
Constructor Details
This class inherits a constructor from Dragnet::Exporters::Exporter
Instance Method Details
#export ⇒ String
Generates the report and returns it as a string.
18 19 20 21 |
# File 'lib/dragnet/exporters/html_exporter.rb', line 18 def export logger.info "Generating HTML report from template: #{TEMPLATE}..." ERB.new(File.read(TEMPLATE)).result(binding) end |