lib/coco/writer/html_index_writer.rb in coco-0.13.0 vs lib/coco/writer/html_index_writer.rb in coco-0.14.0
- old
+ new
@@ -1,20 +1,23 @@
module Coco
-
+
# Public: I write the index.html
+ #
class HtmlIndexWriter
-
+
# 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