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

Item struct

Common data that all items will have

Link to this section Summary

Callbacks

Match a string against the item

Functions

Filter the item's verbs based on the current context

Link to this section Types

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

Link to this section Callbacks

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

Match a string against the item

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