Class: LearnDoctor::HealthCheck
- Inherits:
-
Object
- Object
- LearnDoctor::HealthCheck
- Defined in:
- lib/learn_doctor/health_check.rb,
lib/learn_doctor/health_check/file.rb,
lib/learn_doctor/health_check/step_checker.rb,
lib/learn_doctor/health_check/step_installer.rb
Defined Under Namespace
Classes: File, StepChecker, StepInstaller
Instance Attribute Summary collapse
-
#client ⇒ Object
readonly
Returns the value of attribute client.
-
#failed_steps ⇒ Object
readonly
Returns the value of attribute failed_steps.
-
#passed_steps ⇒ Object
readonly
Returns the value of attribute passed_steps.
-
#setup_step_list ⇒ Object
Returns the value of attribute setup_step_list.
Class Method Summary collapse
Instance Method Summary collapse
- #diagnose ⇒ Object
-
#initialize ⇒ HealthCheck
constructor
A new instance of HealthCheck.
Constructor Details
#initialize ⇒ HealthCheck
Returns a new instance of HealthCheck.
14 15 16 17 18 19 |
# File 'lib/learn_doctor/health_check.rb', line 14 def initialize _login, token = Netrc.read['learn-config'] @client = LearnWeb::Client.new(token: token) @passed_steps = [] @failed_steps = [] end |
Instance Attribute Details
#client ⇒ Object (readonly)
Returns the value of attribute client.
7 8 9 |
# File 'lib/learn_doctor/health_check.rb', line 7 def client @client end |
#failed_steps ⇒ Object (readonly)
Returns the value of attribute failed_steps.
7 8 9 |
# File 'lib/learn_doctor/health_check.rb', line 7 def failed_steps @failed_steps end |
#passed_steps ⇒ Object (readonly)
Returns the value of attribute passed_steps.
7 8 9 |
# File 'lib/learn_doctor/health_check.rb', line 7 def passed_steps @passed_steps end |
#setup_step_list ⇒ Object
Returns the value of attribute setup_step_list.
8 9 10 |
# File 'lib/learn_doctor/health_check.rb', line 8 def setup_step_list @setup_step_list end |
Class Method Details
.diagnose ⇒ Object
10 11 12 |
# File 'lib/learn_doctor/health_check.rb', line 10 def self.diagnose new.diagnose end |
Instance Method Details
#diagnose ⇒ Object
21 22 23 24 25 26 |
# File 'lib/learn_doctor/health_check.rb', line 21 def diagnose ensure_correct_rake! get_setup_step_list! run_checks! install_failures! end |