# Class LittleGhost::Sandbox::Execution

Documentation version: Edge

Canonical HTML: https://littleghostai.org/docs/LittleGhost/Sandbox/Execution.html

Carries captured process output, exit status, and an optional execution error
from Sandbox#execute or Sandbox#execute_program.

## Inheritance

`LittleGhost::Sandbox::Execution < Data`

## Attributes

<a id="attribute-i-error"></a>
### `error` (R)

The execution error, or `nil` when the process completed normally.

<a id="attribute-i-exit_code"></a>
### `exit_code` (R)

The child process exit status, when one is available.

<a id="attribute-i-stderr"></a>
### `stderr` (R)

Captured standard error, subject to the sandbox's output limit.

<a id="attribute-i-stdout"></a>
### `stdout` (R)

Captured standard output, subject to the sandbox's output limit.

## Class methods

<a id="method-c-new"></a>
### `.new`

```ruby
new(stdout:, stderr:, exit_code:, error: nil) -> Execution
```

Collects the observable result of one sandbox process.

## Instance methods

<a id="method-i-success-3F"></a>
### `#success?`

```ruby
#success?()
```

Indicates that no execution error occurred and the exit code is zero.
