tags:

views:

55

answers:

1

In Ruby we can find out the class methods by Class.methods, instance methods by Class.instance_method, is there any methods that lists all the constants defined in a class?

+2  A: 

Class.constants?

newacct
I swear I tried that and it threw me no method error which is why I posted this question. Its working now. Thanks a lot. In case if a mod feels its a stupid question, please feel free to delete it.
satynos