cupboard v0.1.0 Cupboard.Server
Documentation for Cupboard.Server API.
Cupboard stores and retrieves state as a list.
Link to this section Summary
Functions
Retrieve the currently stored list
Start the Cupboard Server with a default empty list as state.
Update the currently stored list
Link to this section Functions
Link to this function
get()
Retrieve the currently stored list
Example
iex>Cupboard.Server.start_link
iex>Cupboard.Server.get
[]
Link to this function
start_link()
Start the Cupboard Server with a default empty list as state.
Example
iex>{:ok, pid} = Cupboard.Server.start_link
iex> is_pid(pid)
true
Link to this function
update(new_state)
Update the currently stored list
Example
iex>Cupboard.Server.start_link
iex>Cupboard.Server.get
[]
iex>Cupboard.Server.update [1]
iex>Cupboard.Server.get
[1]