Class: Internator::CodexService
- Inherits:
-
Object
- Object
- Internator::CodexService
- Defined in:
- lib/internator/codex_service.rb
Overview
Service for executing the Codex CLI with full-auto mode
Instance Method Summary collapse
-
#call ⇒ Integer
Executes ‘codex –full-auto` with the provided instruction.
-
#initialize(instruction) ⇒ CodexService
constructor
A new instance of CodexService.
Constructor Details
#initialize(instruction) ⇒ CodexService
Returns a new instance of CodexService.
5 6 7 |
# File 'lib/internator/codex_service.rb', line 5 def initialize(instruction) @instruction = instruction end |
Instance Method Details
#call ⇒ Integer
Executes ‘codex –full-auto` with the provided instruction.
11 12 13 14 15 16 17 18 19 20 |
# File 'lib/internator/codex_service.rb', line 11 def call command = [ "codex", "exec", "--full-auto", @instruction ] system(*command) $?.exitstatus end |