# Class LittleGhost::CodeMode::Catalog

Documentation version: Edge

Canonical HTML: https://littleghostai.org/docs/LittleGhost/CodeMode/Catalog.html

Normalizes a trusted Tool catalog for a guest language and rejects names that
would collide or shadow code-mode controls.

## Inheritance

`LittleGhost::CodeMode::Catalog < Object`

## Attributes

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

Frozen normalized Tool definitions in declaration order.

## Class methods

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

```ruby
.new(specifications, normalize:, reserved: %w[exec wait stop])
```

Normalizes trusted Tool `specifications` with `normalize`. Names in `reserved`
and names that collide after normalization are rejected.

## Instance methods

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

```ruby
#fetch(name)
```

Returns the normalized definition for `name`.

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

```ruby
#key?(name)
```

Indicates whether `name` is present in the catalog.
