Conditional

A step that only happens if a condition is true. A script must be specified.

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
open override var identifier: StepIdentifier

Get an identifier for this Step.

Link copied to clipboard
open override var name: String

Get the name of this Step.

Functions

Link copied to clipboard
infix fun condition(flag: String)

Set the flag that is checked as part of the condition.

Link copied to clipboard
infix fun does(script: (Flags) -> Unit)

Set the script that is invoked if the condition is true.

Link copied to clipboard
open operator override fun invoke(flags: Flags, cancellationToken: CancellationToken): StepResult

Invoke the step with the specified flags to return a StepResult. A cancellationToken must be provided to allow for the story to be cancelled.

Link copied to clipboard
infix fun name(name: String)

Set the name of this step.

Link copied to clipboard
infix fun returns(result: StepResult)

Set the result that is returned when the condition is met.

Link copied to clipboard
infix fun state(state: Boolean)

Set the desired state of the flag that is checked as part of the condition.