LXR style cross references Ruby code

L

listrecv

While trying to navigate a large, unfamiliar application, I find a
cross referenced browser invaluable.

For statically typed languages, there exist a whole bunch: LXR, the
browser part of MSVC IDE, etc.

For Ruby, are there any?

I realize that it won't be perfect, as you can't always know excatly
where the method is defined. But a simple algorithm which would
certainly be at least 80/20 would be:

1) If it is proceeded by a dot, it is a method name
2) To guess the class of any object: If you see: variable_name =
CapitalLetter.something, you can guess that variable_name is an
instance of CapitalLetter
3) To find a method definition, first look through the methods defined
for that class (RDoc is already able to parse them), then look through
the current file, then, through all the files required in. Failing
that, link to a simple search page, listing all of the places where it
is defined.

For me, a simple browser like this makes all the difference navigating
unfamiliar code.

I have no experience with CTags - maybe it could be used to do
something like this?

---

PS For a radically different approach, how 'bout using Ruby to load the
app in a sandbox, and reflect across the entire ObjectSpace to figure
everything out? Could this be done? I know it's a lot of work -
beyond the scope of my initial request - but, if it could, it could add
code completion and refactoring to dynamic lang IDE's, something which
many developers truely miss.
 
L

listrecv

Huh?!

I thought everyone would jump at this.

Am I the only one who finds these type of cross references TREMENDOUSLY
USEFUL?
 
D

Damphyr

Huh?!

I thought everyone would jump at this.

Am I the only one who finds these type of cross references
TREMENDOUSLY USEFUL?
Maybe because RDoc does most of the cross-references you want, if only
you follow the rules *and* you can read the code.
So you can use your normal browser :)
Cheers,
V.-
--
http://www.braveworld.net/riva

____________________________________________________________________
http://www.freemail.gr - äùñåÜí õðçñåóßá çëåêôñïíéêïý ôá÷õäñïìåßïõ.
http://www.freemail.gr - free email service for the Greek-speaking.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top