Using Ruby's Yard doc tool, can I configure Yard to *not* put methods in alphabetical order?

695 Views Asked by At

I'm developing a Ruby programming tutorial which I'd like to document with Yard. By default, Yard puts all methods in a module/class into alphabetical order. However, since the methods in each module in the tutorial build upon one another, I'd like to keep them in the order I wrote them.

Is there a way to configure Yard to not put methods in alphabetical order?

1

There are 1 best solutions below

0
On BEST ANSWER

The default template does not provide an option for leaving the method names unsorted.

Your options are to create a custom template or patch the default one.

If it helps the line that is sorting the methods is: https://github.com/lsegal/yard/blob/master/templates/default/module/setup.rb#L39