Class: Appydave::Tools::LlmContext::OutputHandler

Inherits:
Object
  • Object
show all
Defined in:
lib/appydave/tools/llm_context/output_handler.rb

Overview

OutputHandler is responsible for writing the output to the desired target

Instance Method Summary collapse

Constructor Details

#initialize(content, options) ⇒ OutputHandler

Returns a new instance of OutputHandler.



8
9
10
11
12
13
14
# File 'lib/appydave/tools/llm_context/output_handler.rb', line 8

def initialize(content, options)
  @content = content
  @output_targets = options.output_target
  @working_directory = options.working_directory
  @smart = options.smart
  @smart_limit = options.smart_limit
end

Instance Method Details

#executeObject



16
17
18
19
20
21
22
# File 'lib/appydave/tools/llm_context/output_handler.rb', line 16

def execute
  if @smart
    execute_smart
  else
    @output_targets.each { |target| route(target) }
  end
end