case / when (Ruby)
case/when is Ruby's classic multi-branch conditional, like a switch. Each when uses the === operator, so it can match values, ranges, classes, and regexes…
case/when is Ruby's classic multi-branch conditional, like a switch. Each when uses the === operator, so it can match values, ranges, classes, and regexes…