Class: RailsLens::Providers::Base
- Inherits:
-
Object
- Object
- RailsLens::Providers::Base
- Defined in:
- lib/rails_lens/providers/base.rb
Overview
Base class for all annotation content providers
Direct Known Subclasses
ExtensionNotesProvider, ExtensionsProvider, IndexNotesProvider, InheritanceProvider, NotesProviderBase, SchemaProvider, SectionProviderBase, ViewNotesProvider
Instance Method Summary collapse
-
#applicable?(_model_class) ⇒ Boolean
Returns true if this provider should process the given model.
-
#process(model_class, connection = nil) ⇒ Object
Processes the model and returns content For :schema type - returns a string with the schema content For :section type - returns a hash with { title: String, content: String } or nil For :notes type - returns an array of note strings.
-
#type ⇒ Object
Returns the type of content this provider generates :schema - Primary schema information (only one allowed) :section - A named section with structured content :notes - Analysis notes and recommendations.
Instance Method Details
#applicable?(_model_class) ⇒ Boolean
Returns true if this provider should process the given model
16 17 18 |
# File 'lib/rails_lens/providers/base.rb', line 16 def applicable?(_model_class) true end |
#process(model_class, connection = nil) ⇒ Object
Processes the model and returns content For :schema type - returns a string with the schema content For :section type - returns a hash with { title: String, content: String } or nil For :notes type - returns an array of note strings
24 25 26 |
# File 'lib/rails_lens/providers/base.rb', line 24 def process(model_class, connection = nil) raise NotImplementedError, "#{self.class} must implement #process" end |
#type ⇒ Object
Returns the type of content this provider generates :schema - Primary schema information (only one allowed) :section - A named section with structured content :notes - Analysis notes and recommendations
11 12 13 |
# File 'lib/rails_lens/providers/base.rb', line 11 def type raise NotImplementedError, "#{self.class} must implement #type" end |