This project is archived and is in readonly mode.

#240 ✓ invalid
Ben Sandofsky

A useful "methods" with my_methods

Reported by Ben Sandofsky | May 23rd, 2008 @ 09:00 AM

When troubleshooting, it's useful to see a list of methods available on an object. Unfortunately, it comes along with a bunch of standard object methods like "inspect".

My fingers get tired typing "@object.methods - Object.methods".

my_methods shows all the methods minus standard object ones.

Comments and changes to this ticket

  • Jan De Poorter

    Jan De Poorter May 23rd, 2008 @ 09:53 AM

    I always use

    @object.class.instance_methods(false)

    Which gives me all public methods of the class without it's super-class methods

    jay

  • Pratik

    Pratik May 29th, 2008 @ 10:48 AM

    • State changed from “new” to “invalid”

    Not in favor of the patch really. You can always do what Jan said.

    Thanks.

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

Tickets have moved to Github

The new ticket tracker is available at https://github.com/rails/rails/issues

Shared Ticket Bins

People watching this ticket

Attachments

Pages