Forum: Ruby on Rails What is the best way to check if a method is a singleton method or an instance method?

Posted by John Merlino (johnmerlino)
on 2012-10-12 19:51
(Received via mailing list)
Let's say I want to check if a method of an object is an instance
method or a singleton method, what is the best way to do it?
Posted by Ignacio Piantanida (Guest)
on 2012-10-13 04:47
(Received via mailing list)
object.singleton_methods.include? :the_method

2012/10/12 John Merlino <stoicism1@aol.com>

>
>
>


--
Piantanida, Ignacio Julin
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.