From: "Paolo \"Nusco\" Perrotta" Date: 2008-01-23T20:04:58+09:00 Subject: Re: Determine where a method is being called from? On Jan 22, 2008 4:47 PM, Ben Johnson wrote: > Is it possible to determine if a public instance method is being called > from an object or within the class? If I understood correctly, you want to look into the call stack. If so, you must resort to an hack. You might want to look into Kernel#caller. To see a practical example, look into the source code for Deep End: gem install deepend (Disclaimer: Deep End is just an half-baked thing I released some time ago, and it basically sucks). Paolo Perrotta Bologna, Italy