Sha256: 44b2206ea27334cdf981f4a59d685a24c680ad98b3d6ca3ff9e5e844a5c60ed5

Contents?: true

Size: 496 Bytes

Versions: 1

Compression:

Stored size: 496 Bytes

Contents

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
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
coco-0.13.0 lib/coco/writer/html_index_writer.rb