Urchin.Prompt.Argument (Urchin v0.2.0)

Copy Markdown View Source

An argument accepted by a prompt template.

Summary

Functions

Builds a prompt argument from a keyword list or map.

Serializes the argument to its wire shape.

Types

t()

@type t() :: %Urchin.Prompt.Argument{
  description: String.t() | nil,
  name: String.t(),
  required: boolean() | nil,
  title: String.t() | nil
}

Functions

new(attrs)

@spec new(keyword() | map()) :: t()

Builds a prompt argument from a keyword list or map.

to_map(arg)

@spec to_map(t()) :: map()

Serializes the argument to its wire shape.