Otera.Cycler (otera v0.1.0)

Copy Markdown View Source

The cycler(*items) object of Jinja2. next() gives the current item and moves to the next one, reset() goes back to the first item, and current is the item that next() gives next. The position lives in Otera.State.

Summary

Functions

Calls the method next or reset.

Returns the attribute name of cycler.

Makes a cycler over items.

Functions

call(cycler, binary)

@spec call(%Otera.Cycler{items: term(), ref: term()}, String.t()) :: term()

Calls the method next or reset.

get(cycler, name)

@spec get(%Otera.Cycler{items: term(), ref: term()}, String.t()) :: term()

Returns the attribute name of cycler.

new(items)

@spec new(list()) :: %Otera.Cycler{items: term(), ref: term()}

Makes a cycler over items.