Class: Coco::HtmlFormatter
- Inherits:
-
Object
- Object
- Coco::HtmlFormatter
- Defined in:
- lib/coco/formatter/html_formatter.rb
Overview
I format coverage’s data into html files.
Instance Method Summary collapse
- #format ⇒ Object
-
#initialize(raw_coverages) ⇒ HtmlFormatter
constructor
A new instance of HtmlFormatter.
Constructor Details
#initialize(raw_coverages) ⇒ HtmlFormatter
Returns a new instance of HtmlFormatter.
10 11 12 13 14 15 |
# File 'lib/coco/formatter/html_formatter.rb', line 10 def initialize(raw_coverages) @raw_coverages = raw_coverages @formatted_output_files = {} @context = nil @template = Template.open(File.join(Coco::ROOT, 'template/file.erb')) end |
Instance Method Details
#format ⇒ Object
17 18 19 20 21 22 |
# File 'lib/coco/formatter/html_formatter.rb', line 17 def format @raw_coverages.each do |filename, coverage| build_html(filename, coverage) end @formatted_output_files end |