Ruby Yard has a function comparable to RDoc: include: tag?

RDoc has: include: tag (see the bottom of this page ), which will accept an arbitrary text file and format as if it were indented wherever the inclusion begins. This is a great way to find the source code for sample documentation.

Does Yard have a similar tag or feature?

+4
source share
1 answer

Currently, YARD only supports embedding documentation from other docstrings objects in the form:

class Foo # Docstring here def method; end # Here is some more docs and {include:Foo#method} def bar; end end 

The inclusion of the file was vaguely planned, but it had never been requested before, so it was not a high priority. If you want to open the problem at http://github.com/lsegal/yard/issues - we can make sure that it will be tracked and added for the upcoming version 0.7.0.

+3
source

Source: https://habr.com/ru/post/1332925/


All Articles