简体   繁体   English

如何在 rails 中为我的模型和控制器生成文档

[英]How to generate docs for my models and controller in rails

I want to create docs for the models and controller of my application.我想为我的应用程序的模型和控制器创建文档。 Even for rake task, any background job.即使是 rake 任务,任何后台工作。 As I have thousands of lines of comments inline between the code, explanation of the all the functions actions..由于我在代码之间内嵌了数千行注释,因此对所有函数操作的解释..

I don't want docs for rails so我不想要 rails 的文档,所以

  rake doc:rails 

is useless for me.对我没用。

Usecase is internal detailed developer notes.用例是内部详细的开发人员说明。

Try using this rake task:尝试使用这个 rake 任务:

rake doc:app

This task is provided by Rdoc .此任务由Rdoc提供。 It also supports some markup that you can use to make things look better when formatted.它还支持一些标记,您可以使用这些标记使格式化后的内容看起来更好。 You can see examples in the documentation .您可以在文档中查看示例。

The RDoc links above point to SourceForge pages which no longer exist. 上面的RDoc链接指向不再存在的SourceForge页面。 The new home for RDoc is on GitHub. RDoc的新家位于GitHub上。

https://github.com/rdoc/rdoc https://github.com/rdoc/rdoc

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM