# Class LittleGhost::DecisionAnswer

Documentation version: Edge

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

One typed answer returned by a decision provider.

## Inheritance

`LittleGhost::DecisionAnswer < Data`

## Attributes

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

Confidence value for Choice and Score answers.

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

Level descriptions for Score answers.

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

Option or level probabilities for Choice and Score answers.

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

Answer type: `:choice`, `:noul`, or `:score`.

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

Selected label, yes probability, or probability-weighted score.

## Instance methods

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

```ruby
#choice()
```

Returns the selected label for a Choice answer, or `nil` for another type.

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

```ruby
#noul()
```

Returns the yes probability from 0 to 1 for a Noul answer, or `nil` for
another type.

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

```ruby
#score()
```

Returns the probability-weighted value for a Score answer, or `nil` for
another type.
