5

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?

Doug
  • 3,119
  • 3
  • 27
  • 30

1 Answers1

3

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

fullsailor
  • 886
  • 6
  • 13