kalevala v0.1.0 Kalevala.World.Item behaviour 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

Link to this type

t()

View Source
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

Link to this callback

matches?(item, keyword)

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

Match a string against the item