Skip to content

Add Put.enum for sorting by position in a caller-supplied list - #5

Merged
rosston merged 1 commit into
mainfrom
enum-value-ordering
Sep 22, 2026
Merged

rosston merged 1 commit into
mainfrom
enum-value-ordering

Conversation

@rosston

@rosston rosston commented Sep 22, 2026

Copy link
Copy Markdown
Member

Closes #2

Lets callers sort discrete values (roles, statuses, tiers) by their position in an explicit order list instead of hand-writing a case/when translation table. Unmatched values sort last rather than raising, matching the gem's existing fault-tolerant design; nil values continue to follow nils_first as with every other Put method.

Closes #2. Lets callers sort discrete values (roles, statuses, tiers)
by their position in an explicit order list instead of hand-writing a
case/when translation table. Unmatched values sort last rather than
raising, matching the gem's existing fault-tolerant design; nil values
continue to follow nils_first as with every other Put method.
@rosston rosston self-assigned this Sep 22, 2026
@rosston
rosston merged commit 1bf7537 into main Sep 22, 2026
4 checks passed
@rosston
rosston deleted the enum-value-ordering branch September 22, 2026 22:15
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.

Adding support for discrete values

1 participant