# Class LittleGhost::StructuredResult

Documentation version: Edge

Canonical HTML: https://littleghostai.org/docs/LittleGhost/StructuredResult.html

Associates a validated structured value with its declared schema name.

    result = LittleGhost::StructuredResult.new(
      schema_name: "support_research",
      value: {"summary" => "The transfer is still settling."}
    )
    result.value.fetch("summary") # => "The transfer is still settling."

## Inheritance

`LittleGhost::StructuredResult < Data`

## Attributes

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

The name declared with `Agent.result_schema`.

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

The locally validated application value.

## Class methods

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

```ruby
new(schema_name:, value:) -> StructuredResult
```

Associates `value` with the schema that validated it.
