# Class LittleGhost::Assembly::Trajectory

Documentation version: Edge

Canonical HTML: https://littleghostai.org/docs/LittleGhost/Assembly/Trajectory.html

Immutable queries over the steps returned by one assembly invocation.

## Inheritance

`LittleGhost::Assembly::Trajectory < Object`

## Includes

- `Enumerable`

## Attributes

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

Immutable steps in execution order.

## Class methods

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

```ruby
.new(steps)
```

Builds query indexes for `steps`.

## Instance methods

<a id="method-i-attempts_for"></a>
### `#attempts_for`

```ruby
#attempts_for(id)
```

Returns attempts belonging to one step.

<a id="method-i-children"></a>
### `#children`

```ruby
#children(id)
```

Returns steps whose parent is `id`.

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

```ruby
#concurrent?(first_id, second_id)
```

Indicates whether attempts from two steps overlapped in time.

<a id="method-i-each"></a>
### `#each`

```ruby
#each(&block)
```

Iterates through steps in execution order.

<a id="method-i-step"></a>
### `#step`

```ruby
#step(id)
```

Finds one step by its stable ID.

<a id="method-i-transitions"></a>
### `#transitions`

```ruby
#transitions()
```

Returns declared predecessor-to-step ID pairs.
