Add exhaustive case matcher#43
Add exhaustive case matcher#43dblock merged 4 commits intodblock:masterfrom peterfication:add-exhaustive-case-statement
Conversation
|
@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.
|
Thanks a lot for the deep review and your comments! I appreciate it :) |
|
Make rubocop happy and we're good to go! Much thanks. |
|
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! |
|
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.
|
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. |
|
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. |
|
But maybe it makes sense to wait for #41 for the 1.0.0 release. |
Are you going to take it up? :) Please! |
I might give it a try next week. |
|
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