View available methods ruby
问题 how can I view all the available methods on an object in ruby. I'm using the aptana IDE when I type File. no methods are displayed. I'm coming from an eclipse/java background. Thanks 回答1: There are several methods: obj.methods obj.public_methods obj.private_methods obj.protected_methods obj.singleton_methods Update To get the object methods apart from all inherited methods you can do: obj.methods(false) As Tempus mentioned in the comments, the following command is very helpful to get the