You can also use a Regex in a case/when structure:
Sure Robert H. but the point was : don't use "switch" logic.
That statement structure in ruby is really not useful at all nor it
is a good idea to use it whatsoever.
The example I gave in ruby is the show how you can replace the
“switch” if you still want to use it.
But you can go far further in using proper “process” redirection
without “case…when” in ruby than with it.
For sure, all of this depends on your needs, if you want a real
simple process over some values, “case…when” is still a weak way to do
that but you can.
Have fun ^_^~