I am wondering if there's a more elegant way to say this in Ruby:
FREE_PLAN_MAXIMUM = 1 BASIC_PLAN_MAXIMUM = 10 PREMIUM_PLAN_MAXIMUM = 100 def maximum_entries_per_month case plan when "premium" PREMIUM_PLAN_MAXIMUM when "basic" BASIC_PLAN_MAXIMUM else FREE_PLAN_MAXIMUM end end I don't like the repetition of premium and basic inside the function. What might be an alternative?