In Ruby on rails, how can I figure out which class mix in which module?
I'm new to rails and I want to find out some way to get what methods are available in certain class?
Should I check out the online document or use the ri tool, I would be great that if there's a graphic tool to show the relation between each class and module.
If you just want to see the methods available for any class, try this:
CLASS_NAME.methods # list of all methods available CLASS_NAME.instance_methods # list of all instance methods CLASS_NAME.public_instance_methods # list of all instance methods which are public CLASS_NAME.private_instance_methods # list of all instance methods which are private CLASS_NAME.protected_instance_methods # list of all instance methods which are protected