D
Dick Davies
Just trying to pick my way through a fairly typical ruby code tree.
[ rubygems in fact - I'm very impressed with it so far, looks like CPAN-done-right - I
wanted to see how it works and contribute if I can. ]
It's split across maybe half-a-dozen files , which are pretty readable. At first
glance I'd guess about 1000-odd lines of code and half-a-dozen classes.
In this case, the code is well laid out and small enough to get your head round all
in one go. (They say the human mind can remember 7 things at once, so I can do the
source files and breathe at the same time. So long as no one tries to talk to me
I should just about manage it).
A larger package would be much harder to get your head round all in one go...
drb and webrick have always seemed a bit daunting to me because of the number of
classes and files involved.
In the past, when I did this with a C app (like the ruby binary),
I'd use 'ctree' and it would pick out the definitions of a function or macro from
the source tree (and would even look in include files for system calls, etc.)
A screen session running vim per file is a bit cumbersome, but the best
I got.
Then I realised a lot of you guys (the ones who write these packages, anyway) must
have a way of doing this.
Is there anything like ctree for ruby code? That is, a source browser that can
find definitions of classes and methods across multiple files.
Ideally: textmode, vi(m) friendly and unencumbered... must enjoy long walks in
the country, smoker preferred, yadda, yadda.
[ rubygems in fact - I'm very impressed with it so far, looks like CPAN-done-right - I
wanted to see how it works and contribute if I can. ]
It's split across maybe half-a-dozen files , which are pretty readable. At first
glance I'd guess about 1000-odd lines of code and half-a-dozen classes.
In this case, the code is well laid out and small enough to get your head round all
in one go. (They say the human mind can remember 7 things at once, so I can do the
source files and breathe at the same time. So long as no one tries to talk to me
I should just about manage it).
A larger package would be much harder to get your head round all in one go...
drb and webrick have always seemed a bit daunting to me because of the number of
classes and files involved.
In the past, when I did this with a C app (like the ruby binary),
I'd use 'ctree' and it would pick out the definitions of a function or macro from
the source tree (and would even look in include files for system calls, etc.)
A screen session running vim per file is a bit cumbersome, but the best
I got.
Then I realised a lot of you guys (the ones who write these packages, anyway) must
have a way of doing this.
Is there anything like ctree for ruby code? That is, a source browser that can
find definitions of classes and methods across multiple files.
Ideally: textmode, vi(m) friendly and unencumbered... must enjoy long walks in
the country, smoker preferred, yadda, yadda.