In Python we can \"dir\" a module, like this:
>>> import re
>>> dir(re)
And it lists all functions in the module. Is ther
I'd go for something like this:
y String.methods.sort
Which will give you a yaml representation of the sorted array of methods. Note that this can be used to list the methods of both classes and objects.
Tip for "searching" for a method in irb:
"something".methods.select {|item| item =~ /query/ }
Tip for trying out methods on a value for comparison:
value = "something"
[:upcase, :downcase, :capitalize].collect {|method| [method, value.send(method)] }
Also, note that you won't get all the same information as Python's dir with object.methods. You have to use a combination of object.methods and class.constants, also class.singleton_methods to get the class methods.
I would have made this a comment to jonelf's answer, but apparently I don't have enough rep.
some_object.methods.sort - Object.new.methods
This isn't exactly what you were asking as others have said, but it gives you the info you are after.