如何编写代码示例,文档中缺少代码?

时间:2012-04-26 06:33:06

标签: ruby documentation

现在我的文档中有以下示例代码:

some_keeper = SomeKeeper.new
some_keeper.report
# ...
# save the report to a file
# ...
some_keeper.fix!

以后不会填写save the report to a file,它会在文档中保留,就像“缺少代码”一样。

文档中是否存在“代码缺失”的标准?

注意:我使用Ruby编写并使用Yardoc作为文档。

1 个答案:

答案 0 :(得分:0)

可以找到可用标记列表here。没有标记丢失,但您可以添加注释。但是,您也可以使用define_tag定义自己的标签。

这意味着您可以定义自己的@missing代码。

http://rubydoc.info/docs/yard/file/docs/Tags.md#Adding_Custom_Tags

相关问题