Add exhaustive case matcher - #43
Conversation
peterfication
commented
Jan 5, 2024
@dblock here you go :) |
dblock
left a comment
There was a problem hiding this comment.
Very close! I left a bunch of comments/questions, take a look.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
peterfication
commented
Jan 6, 2024
Thanks a lot for the deep review and your comments! I appreciate it :) |
dblock
commented
Jan 6, 2024
Make rubocop happy and we're good to go! Much thanks. |
dblock
commented
Jan 6, 2024
Oh and since it's a new feature, increment the version to 0.10.0 in this PR. I also wonder whether it's time for Ruby::Enum to graduate to 1.0. That works for me too, your call! |
peterfication
commented
Jan 7, 2024
Rubocop is failing on master. Hence, I will make the Rubocop adjustments in a separate commit. |
Can be used by including `Ruby::Enum::Ecase` in an enum class. It will add a method called `ecase` that can be used to simulate a case statement that will raise an error if a case/enum value is not handled.
peterfication
commented
Jan 7, 2024
I had to disable and ignore some Rubocop rules. See the Rubocop related commit. I wanted to make as little changes as possible in that commit. |
peterfication
commented
Jan 7, 2024
I feel like it's a good idea to release a 1.0.0 version as it has been proven stable. Note: the 0.9.1 version has not been tagged or released to Ruby gems yet. |
peterfication
commented
Jan 7, 2024
But maybe it makes sense to wait for #41 for the 1.0.0 release. |
Uh oh!
There was an error while loading. Please reload this page.
dblock
commented
Jan 7, 2024
Are you going to take it up? :) Please! |
peterfication
commented
Jan 7, 2024
I might give it a try next week. |
dblock
commented
Jan 7, 2024
Great work @peterfication! Want to help comantain ruby-enum? Drop me your rubygems username to dblock at dblock dot org! |
Can be used by including
Ruby::Enum::Ecasein an enum class. It will add a method calledecasethat can be used to simulate a case statement that will raise an error if a case/enum value is not handled.Fixes#42