Class: RailsAiContext::Introspectors::ActiveSupportIntrospector

Inherits:
Object
  • Object
show all
Defined in:
lib/rails_ai_context/introspectors/active_support_introspector.rb

Overview

Extracts ActiveSupport runtime surface that other introspectors don’t cover: Concerns registry (‘app/**/concerns`), Deprecators registry, MessageEncryptor/MessageVerifier usage, and TaggedLogging tags. Covers RAILS_NERVOUS_SYSTEM.md §17 (ActiveSupport).

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(app) ⇒ ActiveSupportIntrospector

Returns a new instance of ActiveSupportIntrospector.



12
13
14
# File 'lib/rails_ai_context/introspectors/active_support_introspector.rb', line 12

def initialize(app)
  @app = app
end

Instance Attribute Details

#appObject (readonly)

Returns the value of attribute app.



10
11
12
# File 'lib/rails_ai_context/introspectors/active_support_introspector.rb', line 10

def app
  @app
end

Instance Method Details

#callObject



16
17
18
19
20
21
22
23
24
25
26
27
28
# File 'lib/rails_ai_context/introspectors/active_support_introspector.rb', line 16

def call
  {
    concerns: extract_concerns,
    deprecators: extract_deprecators,
    message_verifier_usage: extract_message_verifier_usage,
    tagged_logging: detect_tagged_logging,
    on_load_hooks: common_on_load_hooks,
    cache_usage: detect_cache_usage
  }
rescue => e
  $stderr.puts "[rails-ai-context] ActiveSupportIntrospector#call failed: #{e.message}" if ENV["DEBUG"]
  { error: e.message }
end