Yes, since Range#=== is defined to be the same as include?, you can use ranges in case statements:
case cost
when 1..3 then cost * 1.1
when 3..5 then cost * 1.2
Yes, since Range#=== is defined to be the same as include?, you can use ranges in case statements:
case cost
when 1..3 then cost * 1.1
when 3..5 then cost * 1.2