Yarnspinnex.Option (yarnspinnex v0.3.0)

Copy Markdown View Source

One choice in a -> option group, as returned by Yarnspinnex.step/3. index is what Yarnspinnex.choose/4 takes; enabled? reflects the option's trailing <<if>> and is false for choices that should be shown but cannot be picked. tags and id come from the #tags written after the option, as on a Yarnspinnex.Line.

Summary

Types

t()

@type t() :: %Yarnspinnex.Option{
  enabled?: boolean(),
  id: String.t() | nil,
  index: non_neg_integer(),
  tags: [String.t()],
  text: String.t()
}