lib/coco/writer/html_index_writer.rb in coco-0.10.0 vs lib/coco/writer/html_index_writer.rb in coco-0.11.0
- old
+ new
@@ -1,21 +1,25 @@
# -*- encoding: utf-8 -*-
module Coco
- # I write the index.html
+ # Public: I write the index.html
class HtmlIndexWriter
- def initialize index
+ # Public: Initialize a new HtmlIndexWriter object.
+ #
+ # index - A String HTML document.
+ def initialize(index)
@index = index
@dir = HtmlDirectory.new.coverage_dir
end
+ # Public: Write the index file in the right place.
+ #
+ # Returns nothing.
def write
if File.exist?(@dir)
FileWriter.write File.join(@dir, 'index.html'), @index
end
end
-
end
-
end