Class: Daytona::ExecutionResult

Inherits:
Object
  • Object
show all
Defined in:
lib/daytona/common/code_interpreter.rb

Overview

Result of code execution

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(stdout: '', stderr: '', error: nil) ⇒ ExecutionResult

Returns a new instance of ExecutionResult.



47
48
49
50
51
# File 'lib/daytona/common/code_interpreter.rb', line 47

def initialize(stdout: '', stderr: '', error: nil)
  @stdout = stdout
  @stderr = stderr
  @error = error
end

Instance Attribute Details

#errorExecutionError?

Returns Error details if execution failed, nil otherwise.

Returns:

  • (ExecutionError, nil)

    Error details if execution failed, nil otherwise



45
46
47
# File 'lib/daytona/common/code_interpreter.rb', line 45

def error
  @error
end

#stderrString

Returns Standard error output from the code execution.

Returns:

  • (String)

    Standard error output from the code execution



42
43
44
# File 'lib/daytona/common/code_interpreter.rb', line 42

def stderr
  @stderr
end

#stdoutString

Returns Standard output from the code execution.

Returns:

  • (String)

    Standard output from the code execution



39
40
41
# File 'lib/daytona/common/code_interpreter.rb', line 39

def stdout
  @stdout
end