Class: Coco::UncoveredLister

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

Overview

I retrieve the list of uncovered (0%) .rb files.

Instance Method Summary collapse

Constructor Details

#initialize(sources, covered) ⇒ UncoveredLister

sources - Array of String list of filenames. covered - Hash raw coverage from the domain.


10
11
12
13
# File 'lib/coco/lister/uncovered_lister.rb', line 10

def initialize(sources, covered)
  @source_files = Helpers.expand(sources)
  @covered_files = Helpers.expand(covered.keys)
end

Instance Method Details

#listObject

Returns Array of String list of uncovered filenames.


16
17
18
19
20
21
22
# File 'lib/coco/lister/uncovered_lister.rb', line 16

def list
  list = []
  @source_files.each do |elem|
    list << elem unless @covered_files.include?(elem)
  end
  list
end