Class: ReactOnRails::Doctor
- Inherits:
-
Object
- Object
- ReactOnRails::Doctor
- 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
-
#initialize(verbose: false, fix: false) ⇒ Doctor
constructor
A new instance of Doctor.
- #run_diagnosis ⇒ Object
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_diagnosis ⇒ Object
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 |