Class: RailsAiContext::Introspectors::ViewIntrospector
- Inherits:
-
Object
- Object
- RailsAiContext::Introspectors::ViewIntrospector
- Defined in:
- lib/rails_ai_context/introspectors/view_introspector.rb
Overview
Scans view layer: layouts, templates, partials, helpers, view components, and template engine detection.
Instance Attribute Summary collapse
-
#app ⇒ Object
readonly
Returns the value of attribute app.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(app) ⇒ ViewIntrospector
constructor
A new instance of ViewIntrospector.
Constructor Details
#initialize(app) ⇒ ViewIntrospector
Returns a new instance of ViewIntrospector.
10 11 12 |
# File 'lib/rails_ai_context/introspectors/view_introspector.rb', line 10 def initialize(app) @app = app end |
Instance Attribute Details
#app ⇒ Object (readonly)
Returns the value of attribute app.
8 9 10 |
# File 'lib/rails_ai_context/introspectors/view_introspector.rb', line 8 def app @app end |
Instance Method Details
#call ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/rails_ai_context/introspectors/view_introspector.rb', line 14 def call { layouts: extract_layouts, templates: extract_templates, partials: extract_partials, helpers: extract_helpers, view_components: extract_view_components, template_engines: detect_template_engines, form_builders_detected: detect_form_builders, component_usage: detect_component_usage, layout_mapping: extract_layout_mapping, conditional_layouts: detect_conditional_layouts } rescue => e { error: e. } end |