Class: Coco::HtmlIndexWriter
- Inherits:
-
Object
- Object
- Coco::HtmlIndexWriter
- Defined in:
- lib/coco/writer/html_index_writer.rb
Overview
I write the index.html
Instance Method Summary collapse
-
#initialize(index) ⇒ HtmlIndexWriter
constructor
A new instance of HtmlIndexWriter.
- #write ⇒ Object
Constructor Details
#initialize(index) ⇒ HtmlIndexWriter
Returns a new instance of HtmlIndexWriter.
8 9 10 11 |
# File 'lib/coco/writer/html_index_writer.rb', line 8 def initialize index @index = index @dir = HtmlDirectory.new.coverage_dir end |
Instance Method Details
#write ⇒ Object
13 14 15 16 17 |
# File 'lib/coco/writer/html_index_writer.rb', line 13 def write if File.exist?(@dir) FileWriter.write File.join(@dir, 'index.html'), @index end end |