-
Notifications
You must be signed in to change notification settings - Fork 36
Closed
Description
I would like the ability to convert inclusive and exclusive ranges in case statements. Ex. below:
def mymethod
case bp_range
when -999...0
10
when 1...2
100
when 2..5
120
when 6..10
150
when 11...40
129
else
150
end
end
It can be modeled after the solution in this discussion: https://stackoverflow.com/questions/5619832/switch-on-ranges-of-integers-in-javascript
Metadata
Metadata
Assignees
Labels
No labels