Hello everyone,

I wonder if there is a more elegant/efficient way to rewrite
the case structure in the following code snippet:

def myfunc(obj)
         case obj.class.name
                 when Fixnum.name
                         puts :Fixnum
                 when Float.name
                         puts :Float
                 ...
                 default
                         puts :Object
         end
end

thanks in advance,

George Moschovitis


-- 
www.navel.gr | tel: +30 2106898050 | fax: +30 2106898437

Navel does not accept liability for any errors, viruses or omissions in 
the contents of this message. The full corporate policy is available on 
our site.

have fun: www.joy.gr