lib/covered/summary.rb in covered-0.18.0 vs lib/covered/summary.rb in covered-0.18.1
- old
+ new
@@ -4,18 +4,18 @@
# Copyright, 2018-2022, by Samuel Williams.
require_relative 'statistics'
require_relative 'wrapper'
-require 'console/terminal'
-
module Covered
class Summary
def initialize(threshold: 1.0)
@threshold = threshold
end
def terminal(output)
+ require 'console/terminal'
+
Console::Terminal.for(output).tap do |terminal|
terminal[:path] ||= terminal.style(nil, nil, :bold, :underline)
terminal[:brief_path] ||= terminal.style(:yellow)
terminal[:uncovered_prefix] ||= terminal.style(:red)