Skip to main content

Module dispatch

Module dispatch 

Source
Expand description

Command dispatch — port of the __FILE__ == $0 driver (try.rb:1008-1587): flag extraction, the command case tree, and the exit-code contract (0 = script emitted, 1 = cancel/error, 2 = bare help).

Structs§

Ctx
Everything an invocation needs besides argv: injected so tests and the conformance suite drive the same code as production.

Functions§

run
Run a full invocation. Writes TUI/help/errors to err (stderr) and the emitted script to out (stdout); returns the process exit code.