Skip to content

Rework answer collection API#3

Merged
joetannenbaum merged 5 commits into
mainfrom
collect-answers
May 13, 2026
Merged

Rework answer collection API#3
joetannenbaum merged 5 commits into
mainfrom
collect-answers

Conversation

@joetannenbaum
Copy link
Copy Markdown
Collaborator

Replaces the ask() + withAnswers() terminal-method pattern with a cleaner fluent builder.

collectAnswers() is now the entry point, onQuestion() registers the prompt handler, and withAnswers() is a fluent setter for pre-provided answers rather than a terminal resolver.

PendingAnswers implements ArrayAccess and IteratorAggregate so it can be used directly as an array without calling toArray(). Defaults are now used automatically when non-interactive, removing the need for withDefaults(). run() is renamed to chisel().

@joetannenbaum joetannenbaum merged commit c2ac11c into main May 13, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants