Reputation: 3284
RDoc has the :include: tag (see the bottom of this page) that will take in an arbitrary text file and format as if it was indented wherever the include begins. This is a great way to pull in source code for documentation examples.
Does Yard have a similar tag or feature?
Upvotes: 5
Views: 467
Reputation: 3280
Currently YARD only supports embedding documentation from other object docstrings in the form:
class Foo
# Docstring here
def method; end
# Here is some more docs and {include:Foo#method}
def bar; end
end
File inclusion was vaguely planned but it was never really requested before, so it wasn't high priority. If you want to open an issue on http://github.com/lsegal/yard/issues -- we can make sure it gets tracked and added for the upcoming 0.7.0 release.
Upvotes: 3