Hi -

On Nov 27, 2009, at 6:33 PM, James Englert wrote:

> Hey All,
> 
> Hopefully this isn't the most complex question in the world...
> 
> How can you determine the source file that a Class is using?
> 
> For example, I'd like to find the source file on my hard drive that is 
> supporting the class Feed in the below example.
> 
> Feedzirra::Feed.location_to_source_implementation
> 
> Does anyone know the syntax for this?

AFAIK there's no *simple* syntax for this.
If you need to know your environment better you can try a Gem.default_path and 
join, but it seems like it won't be enough.
If I had to go through all this pain (and I'd sure try to avoid it as much as 
possible) I would use SCRIPT_LINES___

SCRIPT_LINES__ = { }
require 'net/http'
p SCRIPT_LINES__

Good luck :-P
  ngw

--

You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.


Reply via email to