View Source Smokestack.Dsl.Template (smokestack v0.9.1)

Templates which assist in the generation of values.œ

Summary

Functions

Randomly select between a list of options.

Select a constant value

Cycle sequentially between a list of options.

Call a generator a number of times.

Types

@type element() :: any()
@type mapper() :: nil | (any() -> any())

Functions

Link to this function

choose(options, mapper \\ nil)

View Source

Randomly select between a list of options.

Link to this function

constant(value, mapper \\ nil)

View Source
@spec constant(element(), mapper()) :: Smokestack.Template.t()

Select a constant value

Link to this function

cycle(options, mapper \\ nil)

View Source

Cycle sequentially between a list of options.

Link to this function

n_times(n, generator, mapper \\ nil)

View Source

Call a generator a number of times.

Link to this function

sequence(mapper \\ nil, sequence_options \\ [])

View Source
@spec sequence(mapper(), start: number(), step: number()) :: Smokestack.Template.t()

Generate sequential values.