class

Fluxion::Executor::StepExecutor

Inherits Reference < Object

Turns one step into the work it represents.

A step executor's whole job is producing commands. dry-run prints them, apply runs them, and plan --show-commands previews them — from the same method, so a preview cannot describe something different from what runs.

Kinds that need more than a command sequence (a verified download, an atomic install) override execute and still supply commands for preview.

Instance methods

commands(step : Step, item : ModuleItem) : Array(Command)

Commands for one item, in order. Empty means there is nothing to do.

Source
execute(step : Step, item : ModuleItem, runner : ShellRunner, &sink : String -> ) : StepResult

Runs one item. The default runs each command in order and stops at the first that fails, because a later command in a sequence normally assumes the earlier one worked.

Source
items(step : Step) : Array(ModuleItem)

The items this step tracks. Defaults to what the step itself declares; overridden where execution order differs from declaration order.

Source
preview(step : Step, item : ModuleItem) : StepResult::DryRun

What a dry run would do.

Source
run_commands(step : Step, item : ModuleItem, runner : ShellRunner, &sink : String -> ) : StepResult

Runs this item's commands in order, stopping at the first failure.

Named rather than left inline in execute so a subclass that adds its own preconditions can still reach it, without depending on where it sits in the hierarchy.

Source
supports?(step : Step) : Bool
Source