Class: RailsAiBridge::Doctor::Checkers::SchemaChecker
- Inherits:
-
BaseChecker
- Object
- BaseChecker
- RailsAiBridge::Doctor::Checkers::SchemaChecker
- Defined in:
- lib/rails_ai_bridge/doctor/checkers/schema_checker.rb
Overview
Verifies +db/schema.rb+ exists for schema-driven AI context.
Instance Attribute Summary
Attributes inherited from BaseChecker
Instance Method Summary collapse
-
#call ⇒ Doctor::Check
+:pass+ when the schema file exists; +:warn+ 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 the schema file exists; +:warn+ otherwise.
9 10 11 12 13 14 15 16 17 |
# File 'lib/rails_ai_bridge/doctor/checkers/schema_checker.rb', line 9 def call schema_path = File.join(app.root, 'db/schema.rb') check( 'Schema', File.exist?(schema_path), pass: { message: 'db/schema.rb found' }, fail: { status: :warn, message: 'db/schema.rb not found', fix: 'Run `rails db:schema:dump` to generate it' } ) end |