# Ruby (/pipeline-sdk/reference/toolchains/ruby)



{/* Generated by docs-site/scripts/generate-dsl-docs.ts — do not edit. */}

## `ruby` [#ruby]

Callable singleton for the Ruby toolchain — access as `hm.ruby`.

Call directly to construct a `RubyProject`, or use the bare-form
action methods (`ruby.test()`, `ruby.lint()`) for a one-shot leaf.

```python
ruby(*, path='.', version='default', image=None, base=None) -> RubyProject
```

| Parameter                                                     | Type           | Default     | Description                                              |
| ------------------------------------------------------------- | -------------- | ----------- | -------------------------------------------------------- |
| `path`                                                        | `str`          | `'.'`       | Path to the Ruby project root (must contain a            |
| `Gemfile.lock`).                                              |                |             |                                                          |
| `version`                                                     | `str`          | `'default'` | Ruby version. Currently only `"default"` is supported    |
| (installs whichever `ruby-full` ships in the apt repository). |                |             |                                                          |
| Pinned versions require rbenv/asdf support, which is not yet  |                |             |                                                          |
| implemented.                                                  |                |             |                                                          |
| `image`                                                       | `str \| None`  | `None`      | Local-mode Docker base image override.                   |
| `base`                                                        | `Step \| None` | `None`      | Existing `Step` to attach to instead of emitting a fresh |
| apt-base step.                                                |                |             |                                                          |

**Returns** `RubyProject` — A `RubyProject` whose `installed` step is `bundle install`.

### `ruby.lint()` [#rubylint]

```python
lint(**kw) -> Step
```

| Parameter | Type  | Default | Description |
| --------- | ----- | ------- | ----------- |
| `kw`      | `Any` | `{}`    | —           |

**Returns** `Step`

### `ruby.test()` [#rubytest]

```python
test(**kw) -> Step
```

| Parameter | Type  | Default | Description |
| --------- | ----- | ------- | ----------- |
| `kw`      | `Any` | `{}`    | —           |

**Returns** `Step`

## `RubyEntry` [#rubyentry]

Callable singleton for the Ruby toolchain — access as `hm.ruby`.

Call directly to construct a `RubyProject`, or use the bare-form
action methods (`ruby.test()`, `ruby.lint()`) for a one-shot leaf.

### `RubyEntry.lint()` [#rubyentrylint]

```python
lint(**kw) -> Step
```

| Parameter | Type  | Default | Description |
| --------- | ----- | ------- | ----------- |
| `kw`      | `Any` | `{}`    | —           |

**Returns** `Step`

### `RubyEntry.test()` [#rubyentrytest]

```python
test(**kw) -> Step
```

| Parameter | Type  | Default | Description |
| --------- | ----- | ------- | ----------- |
| `kw`      | `Any` | `{}`    | —           |

**Returns** `Step`

## `RubyProject` [#rubyproject]

Ruby project install chain — constructed via `hm.ruby()`.

`installed` is the `bundle install` step. Action methods (`test`,
`lint`) attach leaves to `installed`.

### Fields [#fields]

| Field       | Type   | Default    |
| ----------- | ------ | ---------- |
| `path`      | `str`  | *required* |
| `installed` | `Step` | *required* |

### `RubyProject.lint()` [#rubyprojectlint]

```python
lint(**kw) -> Step
```

| Parameter | Type  | Default | Description |
| --------- | ----- | ------- | ----------- |
| `kw`      | `Any` | `{}`    | —           |

**Returns** `Step`

### `RubyProject.test()` [#rubyprojecttest]

```python
test(**kw) -> Step
```

| Parameter | Type  | Default | Description |
| --------- | ----- | ------- | ----------- |
| `kw`      | `Any` | `{}`    | —           |

**Returns** `Step`
