View Source Hangman.Dictionary.WordsAgent (Hangman Dictionary v0.1.29)

Agent that loads a list of words from external files.

Link to this section Summary

Functions

Returns a specification to start this module under a supervisor.

Starts an agent that loads a list of words from external files.

Link to this section Functions

Returns a specification to start this module under a supervisor.

See Supervisor.

Specs

start_link(term()) :: Agent.on_start()

Starts an agent that loads a list of words from external files.

Examples

iex> alias Hangman.Dictionary.WordsAgent
iex> {:error, {:already_started, agent}} = WordsAgent.start_link(:ok)
iex> is_pid(agent) and agent == Process.whereis(WordsAgent)
true