Class: Smith::Doctor::Printer

Inherits:
Object
  • Object
show all
Defined in:
lib/smith/doctor/printer.rb

Constant Summary collapse

CLEAR =
"\e[0m"
BOLD =
"\e[1m"
RED =
"\e[31m"
GREEN =
"\e[32m"
YELLOW =
"\e[33m"
CYAN =
"\e[36m"
WHITE =
"\e[37m"
ICONS =
{ pass: "\u2713", fail: "\u2717", warn: "!", skip: "-" }.freeze
COLORS =
{ pass: GREEN, fail: RED, warn: YELLOW, skip: CYAN }.freeze

Instance Method Summary collapse

Constructor Details

#initialize(report, io: $stdout) ⇒ Printer

Returns a new instance of Printer.



17
18
19
20
# File 'lib/smith/doctor/printer.rb', line 17

def initialize(report, io: $stdout)
  @report = report
  @io = io
end

Instance Method Details



22
23
24
25
26
# File 'lib/smith/doctor/printer.rb', line 22

def print
  @io.puts colorize("\nSmith Doctor\n", BOLD, WHITE)
  print_grouped_checks
  print_summary
end