Class: ReactOnRails::Doctor

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

Overview

rubocop:disable Metrics/ClassLength, Metrics/AbcSize

Constant Summary collapse

MESSAGE_COLORS =
{
  error: :red,
  warning: :yellow,
  success: :green,
  info: :blue
}.freeze

Instance Method Summary collapse

Constructor Details

#initialize(verbose: false, fix: false) ⇒ Doctor

Returns a new instance of Doctor.



46
47
48
49
50
# File 'lib/react_on_rails/doctor.rb', line 46

def initialize(verbose: false, fix: false)
  @verbose = verbose
  @fix = fix
  @checker = SystemChecker.new
end

Instance Method Details

#run_diagnosisObject



52
53
54
55
56
57
58
59
# File 'lib/react_on_rails/doctor.rb', line 52

def run_diagnosis
  print_header
  run_all_checks
  print_summary
  print_recommendations if should_show_recommendations?

  exit_with_status
end