Class: RailsAiBridge::Configuration

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/rails_ai_bridge/configuration.rb

Overview

Facade that composes five config sub-objects and exposes a flat DSL.

All attributes remain accessible directly on this object for backward compatibility. Callers that need only one concern can receive the sub-object via +#auth+, +#server+, +#introspection+, +#output+, or +#mcp+.

Flat delegators are provided for the most commonly set attributes on each sub-object. Less-common attributes (e.g. +mcp.mode+, +mcp.authorize+) are only accessible via the sub-object directly, keeping the top-level DSL clean.

Constant Summary collapse

PRESETS =
{
  standard: %i[schema models routes jobs gems conventions controllers tests migrations],
  full: %i[schema models non_ar_models routes jobs gems conventions stimulus controllers views turbo
           i18n config active_storage action_text auth api tests rake_tasks assets
           devops action_mailbox migrations seeds middleware engines multi_database],
  regulated: %i[routes jobs gems conventions controllers tests]
}.freeze
INTROSPECTION_CATEGORY_INTROSPECTORS =
{
  domain_metadata: %i[schema models non_ar_models migrations],
  api_surface: %i[api],
  ui_stack: %i[views stimulus turbo i18n]
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



54
55
56
57
58
59
60
# File 'lib/rails_ai_bridge/configuration.rb', line 54

def initialize
  @auth          = Config::Auth.new
  @server        = Config::Server.new
  @introspection = Config::Introspection.new
  @output        = Config::Output.new
  @mcp           = Config::Mcp.new
end

Instance Attribute Details

#authConfig::Auth (readonly)

Returns:



40
41
42
# File 'lib/rails_ai_bridge/configuration.rb', line 40

def auth
  @auth
end

#introspectionConfig::Introspection (readonly)



46
47
48
# File 'lib/rails_ai_bridge/configuration.rb', line 46

def introspection
  @introspection
end

#mcpConfig::Mcp (readonly)

Returns:



52
53
54
# File 'lib/rails_ai_bridge/configuration.rb', line 52

def mcp
  @mcp
end

#outputConfig::Output (readonly)

Returns:



49
50
51
# File 'lib/rails_ai_bridge/configuration.rb', line 49

def output
  @output
end

#serverConfig::Server (readonly)

Returns:



43
44
45
# File 'lib/rails_ai_bridge/configuration.rb', line 43

def server
  @server
end