Class: Coco::Project

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

Overview

A project reports statistics about the code coverage.

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(raw_result, out) ⇒ Project

Returns a new instance of Project.



15
16
17
18
19
# File 'lib/coco/project.rb', line 15

def initialize(raw_result, out)
  @raw_result = raw_result
  @out = out
  @config = Configuration.new
end

Class Method Details

.run(raw_result, out = STDOUT) ⇒ Object

raw_result - The hash obtain by the call to ‘Coverage.result`. out - The output where results will be displayed, by

default this is stdout.


11
12
13
# File 'lib/coco/project.rb', line 11

def self.run(raw_result, out = STDOUT)
  new(raw_result, out).run
end

Instance Method Details

#runObject



21
22
23
24
25
26
# File 'lib/coco/project.rb', line 21

def run
  return unless @config.run_this_time?

  report_on_console
  report_in_html
end