Class: Coco::HtmlFilesWriter
- Inherits:
-
Object
- Object
- Coco::HtmlFilesWriter
- Defined in:
- lib/coco/writer/html_files_writer.rb
Overview
Public: I populate the coverage/ directory with files, if any.
Instance Method Summary collapse
-
#initialize(html_files) ⇒ HtmlFilesWriter
constructor
Public: Initialize a new HtmlFilesWriter.
-
#write ⇒ Object
Public: Write HTML files in the right place.
Constructor Details
#initialize(html_files) ⇒ HtmlFilesWriter
Public: Initialize a new HtmlFilesWriter.
html_files - Hash, key is filename, value is html content.
11 12 13 14 |
# File 'lib/coco/writer/html_files_writer.rb', line 11 def initialize(html_files) @html_files = html_files @html_dir = HtmlDirectory.new end |
Instance Method Details
#write ⇒ Object
Public: Write HTML files in the right place.
Returns nothing.
19 20 21 22 23 24 25 |
# File 'lib/coco/writer/html_files_writer.rb', line 19 def write @html_dir.clean if @html_files.size > 0 @html_dir.setup write_each_file end end |