Question

There is an equivalent to RDoc sections, With YARD ?

See http://www.ruby-doc.org/stdlib-1.9.3/libdoc/rdoc/rdoc/RDoc/Context/Section.html

I want to build categorized API, and section could be the good way to do it.

Was it helpful?

Solution

Ok, i just discover features i don't know before in Yard : the directives :

#@!<something>

Tokens prefixed by a "!", In this Directives , there is :

#@!group <a group>
#@!endgroup

you could use it like :

# @!group Rendering methods                                                                                                                                                                        

def render
  [...]
end

def pretty_render
  [...]
end

# @!endgroup      

And it's provide exactly what i want :) Sorry, because it's in the main doc,

http://rubydoc.info/gems/yard/file/docs/Tags.md (see directives)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top