ExMachine.Context (ex_machine v0.1.0)
View SourceSummary
Functions
Delete a key from the context. Same as Map.delete/2, useful because its imported in state module
Get the value of key in context. Same as Map.get/3, useful because its imported in state module
Puts the given value under key in context. Same as Map.put/3, useful because its imported in state module
Puts the given term under the event params key in context.
Raise an internal event during the execution of an action
Functions
Delete a key from the context. Same as Map.delete/2, useful because its imported in state module
Examples
iex> context = put(%{}, :hello, :world)
iex> context[:hello]
:world
iex> context = delete(context, :hello)
iex> context[:hello]
nil
Get the value of key in context. Same as Map.get/3, useful because its imported in state module
Examples
iex> context = put(%{}, :hello, :world)
iex> get(context, :hello)
:world
Puts the given value under key in context. Same as Map.put/3, useful because its imported in state module
Examples
iex> context = put(%{}, :hello, :world)
iex> context[:hello]
:world
Puts the given term under the event params key in context.
Raise an internal event during the execution of an action