Wednesday, 7 August 2013

How can I create Ruby documentation with a hierarchical view of classes?

How can I create Ruby documentation with a hierarchical view of classes?

I am new to documenting Ruby code.
I have tried both Rdoc and Yard. They work fine, but I am somewhat
uncomfortable with how they list my classes (alphabetically).
I have a class Action, with subclasses Run, Jump, Duck, etc. Then I have a
class Character with classes Hero and Monster.
Rdoc and Yard will give me something like this:
Action
Character
Duck
Hero
Jump
Monster
Run
But frankly, this just makes no sense. I'd rather have this:
Action
Duck
Jump
Run
Character
Hero
Monster
Or even write my own categories:
"Actionable Stuff"
Action

Duck

Jump

Run
"Interactive Stuff"
Character

Hero

Monster
But not a plain alphabetical list. How can I achieve this in either Rdoc
or Yard? If not, is there any other Ruby documenting tool that may provide
this kind of view?

No comments:

Post a Comment