View Source Shifts.Shift behaviour (Shifts v0.0.1)

TODO

Summary

Types

@type chore_input() :: String.t() | operation_name() | (map() -> String.t())
@type operation() :: {Shifts.Chore.t(), chore_input()} | {:each, [t()]}
@type operation_name() :: atom()
@type t() :: %Shifts.Shift{operations: [{operation_name(), operation()}]}

TODO

Callbacks

@callback work(shift :: t(), input :: term()) :: t()

TODO

Functions

Link to this function

chore(shift, name, input, opts \\ [])

View Source
@spec chore(t(), operation_name(), chore_input(), Shifts.Chore.t() | keyword()) :: t()

TODO

Link to this function

each(shift, name, enum, callback)

View Source
@spec each(t(), operation_name(), Enumerable.t(), (t(), term() -> t())) :: t()

TODO

Link to this macro

is_chore_input(input)

View Source (macro)