Class: Coco::HtmlFormatter
- Defined in:
- lib/coco/formatter/html_formatter.rb
Overview
TODO:
document and change name to HtmlFilesFormatter
I format coverages information 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.
11 12 13 14 15 16 |
# File 'lib/coco/formatter/html_formatter.rb', line 11 def initialize raw_coverages super(raw_coverages, []) @formatted_output_files = {} @context = nil @template = Template.open File.join($COCO_PATH,'template/file.erb') end |
Instance Method Details
#format ⇒ Object
18 19 20 21 22 23 |
# File 'lib/coco/formatter/html_formatter.rb', line 18 def format @raw_coverages.each do |filename, coverage| build_html filename, coverage end @formatted_output_files end |