Omni.Answer (Omni v2.0.0)

Copy Markdown View Source

Answers to the questions of a decision.

Omni.decide/3 returns an Omni.Decision whose :answers is a keyword list aligned with its questions, one answer per question:

Pattern match on the struct:

case decision.answers[:team] do
  %Omni.Answer.Choice{choice: team} -> route(team)
  %Omni.Answer.Refusal{} -> route(:manual)
end

Summary

Types

t()

An answer to a decision question.

Types

t()

An answer to a decision question.