Class: RailsAiBridge::Doctor::Checkers::RoutesChecker
- Inherits:
-
BaseChecker
- Object
- BaseChecker
- RailsAiBridge::Doctor::Checkers::RoutesChecker
- Defined in:
- lib/rails_ai_bridge/doctor/checkers/routes_checker.rb
Overview
Verifies +config/routes.rb+ exists.
Instance Attribute Summary
Attributes inherited from BaseChecker
Instance Method Summary collapse
-
#call ⇒ Doctor::Check
+:pass+ when routes file exists; +:fail+ otherwise.
Methods inherited from BaseChecker
Constructor Details
This class inherits a constructor from RailsAiBridge::Doctor::Checkers::BaseChecker
Instance Method Details
#call ⇒ Doctor::Check
Returns +:pass+ when routes file exists; +:fail+ otherwise.
9 10 11 12 13 14 15 16 17 18 |
# File 'lib/rails_ai_bridge/doctor/checkers/routes_checker.rb', line 9 def call routes_path = File.join(app.root, 'config/routes.rb') check( 'Routes', File.exist?(routes_path), pass: { message: 'config/routes.rb found' }, fail: { status: :fail, message: 'config/routes.rb not found', fix: "Ensure you're in a Rails app root directory" } ) end |