Can I reflect all the methods of a class in Ruby [duplicate]
Possible Duplicate:
Get list of a开发者_运维技巧 class' methods
Suppose I haven't any reference on hand, and I want to see all the methods in the built-in File class, is that simply available?
---------------------------EDIT---------------------------
answered in Get list of a class' instance methods
Sure, try:
File.methods
And if you have the awesome_print gem installed then it formats the list nicely and provides extra information.
精彩评论