Class: Covered::BriefSummary
- Defined in:
- lib/covered/summary.rb
Instance Attribute Summary
Attributes inherited from Wrapper
Instance Method Summary collapse
Methods inherited from Summary
#each, #initialize, #print_annotations
Methods inherited from Wrapper
#disable, #each, #enable, #initialize, #mark, #to_h
Constructor Details
This class inherits a constructor from Covered::Summary
Instance Method Details
#print_summary(output = $stdout, before: 4, after: 4) ⇒ Object
102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 |
# File 'lib/covered/summary.rb', line 102 def print_summary(output = $stdout, before: 4, after: 4) ordered = [] statistics = self.each do |coverage| ordered << coverage unless coverage.complete? end output.puts statistics.print_summary(output) if ordered.any? output.puts "", "Least Coverage:" ordered.sort_by!(&:missing_count).reverse! ordered.first(5).each do |coverage| output.write Rainbow(coverage.path).orange output.puts ": #{coverage.missing_count} lines not executed!" end end end |