Class: Coco::Project
- Inherits:
-
Object
- Object
- Coco::Project
- Defined in:
- lib/coco/project.rb
Overview
A project reports statistics about the code coverage.
Constant Summary collapse
- EXIT_ON_LOW_COVERAGE_CODE =
2
Class Method Summary collapse
-
.run(raw_result, out = STDOUT) ⇒ Object
raw_result - The hash obtain by the call to ‘Coverage.result`.
Instance Method Summary collapse
-
#initialize(raw_result, out) ⇒ Project
constructor
A new instance of Project.
- #run ⇒ Object
Constructor Details
#initialize(raw_result, out) ⇒ Project
Returns a new instance of Project.
16 17 18 19 20 |
# File 'lib/coco/project.rb', line 16 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.
12 13 14 |
# File 'lib/coco/project.rb', line 12 def self.run(raw_result, out = STDOUT) new(raw_result, out).run end |
Instance Method Details
#run ⇒ Object
22 23 24 25 26 27 28 29 |
# File 'lib/coco/project.rb', line 22 def run return unless @config.run_this_time? report_on_console report_in_html maybe_exit_if_low_coverage end |