[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Getting the module of a class

csshsh@gmail.com

3/26/2006 3:29:00 PM

Hi!

Can anybody think of a better way to get the module of a class in a module?

eval(some_class_in_a_module.to_s.gsub(/::[^:]*$/, ''))

Thanks!

Ciao!
Florian