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

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

element()

@type element() :: any()

mapper()

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

Functions

choose(options, mapper \\ nil)

Randomly select between a list of options.

constant(value, mapper \\ nil)

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

Select a constant value

cycle(options, mapper \\ nil)

Cycle sequentially between a list of options.

n_times(n, generator, mapper \\ nil)

Call a generator a number of times.

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

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

Generate sequential values.