Module: Diogenes::Targets

Defined in:
lib/diogenes/targets.rb,
lib/diogenes/targets/base.rb,
lib/diogenes/targets/codex.rb,
lib/diogenes/targets/cursor.rb,
lib/diogenes/targets/gemini.rb,
lib/diogenes/targets/copilot.rb,
lib/diogenes/targets/claude_code.rb

Defined Under Namespace

Classes: Base, ClaudeCode, Codex, Copilot, Cursor, Gemini

Constant Summary collapse

KNOWN =

: Array

%i[claude_code cursor copilot codex gemini].freeze

Class Method Summary collapse

Class Method Details

.for(key, cwd:, out:) ⇒ Object

: (Symbol, cwd: String, out: IO) -> Targets::Base



9
10
11
12
13
14
15
16
17
18
# File 'lib/diogenes/targets.rb', line 9

def self.for(key, cwd:, out:)
  case key
  when :claude_code then ClaudeCode.new(cwd:, out:)
  when :cursor then Cursor.new(cwd:, out:)
  when :copilot then Copilot.new(cwd:, out:)
  when :codex then Codex.new(cwd:, out:)
  when :gemini then Gemini.new(cwd:, out:)
  else raise UserError, "Unknown target: #{key}. Known targets: #{KNOWN.join(", ")}"
  end
end