From: Yossef Mendelssohn Date: 2009-11-23T08:24:12+09:00 Subject: Re: Detective - a new ruby gem On Nov 22, 12:39 pm, Ahmed Eldawy wrote: > I've released a new version which supports method_missing like methods. > Here's an example > Detective is now also working with method_missing … > >   Detective.view_source('ActiveRecord::Base#find_by_id') The trouble is that find_by_id is a class method of AR::Base, not an instance method (you should be looking for ActiveRecord::Base.find_by_id). It seems you have correctly returned the instance method_missing (ActiveRecord::Base#method_missing), but it's highly unlikely that this will fulfill a request for find_by_id. I haven't bothered to look at the Detective source. Since you mentioned something about finding the lines in the file and then opening the file itself to get the source code, I suggest you may want to take a look at ruby2ruby. -- -yossef