Solid.Context (solid v0.7.1)

Link to this section Summary

Functions

Get data from context respecting the scope order provided.

Find the current value that cycle must return

Link to this section Types

Specs

scope() :: :counter_vars | :vars | :iteration_vars

Specs

t() :: %Solid.Context{
  counter_vars: Map.t(),
  cycle_state: Map.t(),
  iteration_vars: %{optional(String.t()) => term()},
  vars: Map.t()
}

Link to this section Functions

Link to this function

get_in(context, key, scopes)

Specs

get_in(t(), [term()], [scope()]) :: term()

Get data from context respecting the scope order provided.

Possible scope values: :counter_vars, :vars or :iteration_vars

Link to this function

run_cycle(context, cycle)

Specs

run_cycle(
  t(),
  [{:values, [String.t()]}] | [name: String.t(), values: [String.t()]]
) :: {t(), String.t()}

Find the current value that cycle must return