I have problem to write method which generate custom case statement.
My code:
nr=68
puts case nr
when 0..64 then "1"
when 65..69 then "2"
when 70..79 then "3"
when 80..89 then "4"
when 90..Float::INFINITY then "5"
end
I wish to create method that generete this kind of code, for example:
puts create_case_range(68,[64,69,79,89])