What is the best way to use a class object in case statement? Suppose I have a which is an instance of the Class class. I want to match it against
a
Class
Because
Array === Array # return false
and "case when" means "===", so you meet the problem.