Kalevala.World.Item behaviour (kalevala v0.1.0) View Source

Item struct

Common data that all items will have

Link to this section Summary

Functions

Filter the item's verbs based on the current context

Callbacks

Match a string against the item

Link to this section Types

Specs

t() :: %Kalevala.World.Item{
  callback_module: term(),
  description: term(),
  id: term(),
  meta: term(),
  name: term(),
  verbs: term()
}

Link to this section Functions

Link to this function

context_verbs(item, context)

View Source

Filter the item's verbs based on the current context

Link to this section Callbacks

Specs

matches?(item :: t(), keyword :: String.t()) :: boolean()

Match a string against the item