Class: OllamaAgent::Synthesis::RouteSynthesizer
- Inherits:
-
Object
- Object
- OllamaAgent::Synthesis::RouteSynthesizer
- Defined in:
- lib/ollama_agent/synthesis/route_synthesizer.rb
Overview
Builds deterministic routes.rb fragments from IntegrationExtractor output.
Constant Summary collapse
- REST_ORDER =
IntegrationExtractor::REST_ACTIONS
Instance Method Summary collapse
-
#initialize(integration_extractor:) ⇒ RouteSynthesizer
constructor
A new instance of RouteSynthesizer.
- #synthesize ⇒ Object
Constructor Details
#initialize(integration_extractor:) ⇒ RouteSynthesizer
Returns a new instance of RouteSynthesizer.
12 13 14 |
# File 'lib/ollama_agent/synthesis/route_synthesizer.rb', line 12 def initialize(integration_extractor:) @integration_extractor = integration_extractor end |
Instance Method Details
#synthesize ⇒ Object
16 17 18 19 20 21 |
# File 'lib/ollama_agent/synthesis/route_synthesizer.rb', line 16 def synthesize scan = @integration_extractor.extract grouped = scan.routes.group_by(&:controller_fqcn) blocks = grouped.keys.sort.map { |fqcn| emit_controller_block(fqcn, grouped[fqcn]) } "#{blocks.join("\n\n")}\n" end |