Here is the scenario:
case code
when 'www', '', nil
false
when 'code1', 'code2'... 'code_n' # The array STORE_CODES contains all the codes
true
else
false
end
How can I use STORE_CODES
directly after when
instead of 'code1', 'code2'... 'code_n'
just use:
when *STORE_CODES
instead of :
when 'code1', 'code2'... 'code_n'