Class: Reviewer::Doctor::OpportunityCheck
- Inherits:
-
Object
- Object
- Reviewer::Doctor::OpportunityCheck
- Defined in:
- lib/reviewer/doctor/opportunity_check.rb
Overview
Suggests improvements based on current configuration and project state
Instance Attribute Summary collapse
-
#project_dir ⇒ Object
readonly
Returns the value of attribute project_dir.
-
#report ⇒ Object
readonly
Returns the value of attribute report.
Instance Method Summary collapse
-
#check ⇒ Object
Checks for unconfigured tools, missing file targeting, and missing format commands.
-
#initialize(report, project_dir, configuration:, tools:) ⇒ OpportunityCheck
constructor
Creates an opportunity checker that scans for unconfigured tools and missing features.
Constructor Details
#initialize(report, project_dir, configuration:, tools:) ⇒ OpportunityCheck
Creates an opportunity checker that scans for unconfigured tools and missing features
16 17 18 19 20 21 |
# File 'lib/reviewer/doctor/opportunity_check.rb', line 16 def initialize(report, project_dir, configuration:, tools:) @report = report @project_dir = project_dir @configuration = configuration @tools = tools end |
Instance Attribute Details
#project_dir ⇒ Object (readonly)
Returns the value of attribute project_dir.
7 8 9 |
# File 'lib/reviewer/doctor/opportunity_check.rb', line 7 def project_dir @project_dir end |
#report ⇒ Object (readonly)
Returns the value of attribute report.
7 8 9 |
# File 'lib/reviewer/doctor/opportunity_check.rb', line 7 def report @report end |
Instance Method Details
#check ⇒ Object
Checks for unconfigured tools, missing file targeting, and missing format commands
24 25 26 27 28 29 30 |
# File 'lib/reviewer/doctor/opportunity_check.rb', line 24 def check return unless @configuration.file.exist? check_unconfigured_tools check_missing_files_config check_missing_format_command end |