1 2 3 4 5 6 7 8 9 10
def func(className) case className.to_s when Fixnum.to_s then puts "Fixnum" when String.to_s then puts "String" else puts "Some other stuff" end end func(10.class) func("10".class)