Class: RailsAiBridge::Introspectors::ActionTextIntrospector
- Inherits:
-
Object
- Object
- RailsAiBridge::Introspectors::ActionTextIntrospector
- Defined in:
- lib/rails_ai_bridge/introspectors/action_text_introspector.rb
Overview
Discovers Action Text usage: rich text fields per model.
Instance Attribute Summary collapse
-
#app ⇒ Object
readonly
Returns the value of attribute app.
-
#path_resolver ⇒ Object
readonly
Returns the value of attribute path_resolver.
Instance Method Summary collapse
-
#call ⇒ Hash
Builds a read-only summary of Action Text usage.
-
#initialize(app) ⇒ ActionTextIntrospector
constructor
A new instance of ActionTextIntrospector.
Constructor Details
#initialize(app) ⇒ ActionTextIntrospector
Returns a new instance of ActionTextIntrospector.
10 11 12 13 |
# File 'lib/rails_ai_bridge/introspectors/action_text_introspector.rb', line 10 def initialize(app) @app = app @path_resolver = PathResolver.new(app) end |
Instance Attribute Details
#app ⇒ Object (readonly)
Returns the value of attribute app.
7 8 9 |
# File 'lib/rails_ai_bridge/introspectors/action_text_introspector.rb', line 7 def app @app end |
#path_resolver ⇒ Object (readonly)
Returns the value of attribute path_resolver.
7 8 9 |
# File 'lib/rails_ai_bridge/introspectors/action_text_introspector.rb', line 7 def path_resolver @path_resolver end |
Instance Method Details
#call ⇒ Hash
Builds a read-only summary of Action Text usage.
18 19 20 21 22 23 24 25 |
# File 'lib/rails_ai_bridge/introspectors/action_text_introspector.rb', line 18 def call { installed: defined?(ActionText) ? true : false, rich_text_fields: extract_rich_text_fields } rescue StandardError => error { error: error. } end |