Presto v0.1.2 Presto.Page behaviour View Source

Link to this section Summary

Functions

Returns a specification to start this module under a supervisor

Performs an update operation by calling update(message, model) on the page_module module from init

Initializes state with the page_module and initial model from start_link

Sends an update message to the page, returning the newly rendered content

Sends an update message to the page, returning the newly rendered content

Link to this section Types

Link to this type assigns() View Source
assigns() :: Keyword.t | map
Link to this type message() View Source
message() :: term
Link to this type model() View Source
model() :: term

Link to this section Functions

Returns a specification to start this module under a supervisor.

See Supervisor.

Link to this function handle_call(msg, from, state) View Source

Performs an update operation by calling update(message, model) on the page_module module from init

Initializes state with the page_module and initial model from start_link

Sends an update message to the page, returning the newly rendered content.

Link to this function start_link(page_module, page_key, initial_model \\ %{}) View Source

Starts a Presto.Page GenServer

Sends an update message to the page, returning the newly rendered content.

Link to this section Callbacks

Link to this callback initial_model(model) View Source
initial_model(model) :: term
Link to this callback page_id(assigns) View Source
page_id(assigns) :: term
Link to this callback update(message, model) View Source
update(message, model) :: model