Class: Coco::Formatter

Inherits:
Object
  • Object
show all
Defined in:
lib/coco/formatter/formatter.rb

Overview

My childs will format coverages information. Kind of abstract class, my childs must implements the `format` method.

Instance Method Summary collapse

Constructor Details

#initialize(raw_coverages, uncovered) ⇒ Formatter

raw_coverages - The Hash from Coverage.result. Keys are filenames

and values are an Array representing each lines of
the file :
+ nil       : Unreacheable (comments, etc).
+ 0         : Not hit.
+ 1 or more : Number of hits.

uncovered - An Array list of uncovered files.

TODO I think covered is a better name than raw_coverages



19
20
21
22
# File 'lib/coco/formatter/formatter.rb', line 19

def initialize(raw_coverages, uncovered)
  @raw_coverages = raw_coverages
  @uncovered = uncovered
end