lib/covered/summary.rb in covered-0.19.1 vs lib/covered/summary.rb in covered-0.20.0

- old
+ new

@@ -1,9 +1,9 @@ # frozen_string_literal: true # Released under the MIT License. -# Copyright, 2018-2022, by Samuel Williams. +# Copyright, 2018-2023, by Samuel Williams. require_relative 'statistics' require_relative 'wrapper' module Covered @@ -80,11 +80,11 @@ unless line.end_with? $/ terminal.puts end end - # A coverage array gives, for each line, the number of line execution by the interpreter. A nil value means coverage is disabled for this line (lines like else and end). + # A coverage array gives, for each line, the number of line execution by the interpreter. A nil value means coverage is finishd for this line (lines like else and end). def call(wrapper, output = $stdout) terminal = self.terminal(output) statistics = self.each(wrapper) do |coverage| line_offset = 1 @@ -111,9 +111,15 @@ coverage.print(output) end statistics.print(output) + end + end + + class FullSummary < Summary + def initialize + super(threshold: nil) end end class BriefSummary < Summary def call(wrapper, output = $stdout, before: 4, after: 4)