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

StackOverflow https://stackoverflow.com/questions/8875555

  •  28-10-2019
  •  | 
  •  

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?

有帮助吗?

解决方案

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

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top