Class: RailsAiBridge::Introspectors::ConfigIntrospector
- Inherits:
-
Object
- Object
- RailsAiBridge::Introspectors::ConfigIntrospector
- Defined in:
- lib/rails_ai_bridge/introspectors/config_introspector.rb
Overview
Extracts application configuration: cache store, session store, timezone, middleware stack, initializers, credentials keys.
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 runtime configuration signals.
-
#initialize(app) ⇒ ConfigIntrospector
constructor
A new instance of ConfigIntrospector.
Constructor Details
#initialize(app) ⇒ ConfigIntrospector
Returns a new instance of ConfigIntrospector.
11 12 13 14 15 |
# File 'lib/rails_ai_bridge/introspectors/config_introspector.rb', line 11 def initialize(app) @app = app @path_resolver = PathResolver.new(app) @timezone_introspector = Introspectors::TimezoneIntrospector.new(app) end |
Instance Attribute Details
#app ⇒ Object (readonly)
Returns the value of attribute app.
8 9 10 |
# File 'lib/rails_ai_bridge/introspectors/config_introspector.rb', line 8 def app @app end |
#path_resolver ⇒ Object (readonly)
Returns the value of attribute path_resolver.
8 9 10 |
# File 'lib/rails_ai_bridge/introspectors/config_introspector.rb', line 8 def path_resolver @path_resolver end |
Instance Method Details
#call ⇒ Hash
Builds a read-only summary of runtime configuration signals.
23 24 25 26 27 28 29 30 31 32 |
# File 'lib/rails_ai_bridge/introspectors/config_introspector.rb', line 23 def call timezone_facts = @timezone_introspector.call # Preserve the error contract: a failing timezone read must surface as # { error: msg }, exactly as before this introspector was extracted. return timezone_facts if timezone_facts[:error] build_result(timezone_facts) rescue StandardError => error { error: error. } end |