简体   繁体   English

在ruby rails中记录私有方法

[英]documenting private methods in ruby rails

I can use rdoc to generate Darkfish documentation for rails code including my private methods, as in 我可以使用rdoc为rails代码生成Darkfish文档,包括我的私有方法,如下所示:

rdoc app --all

but when I use the built in rake task: 但是当我使用内置的rake任务时:

bin/rake doc:app

it won't accept the "--all" option. 它不会接受“ --all”选项。

Is there an option for this? 有这个选项吗?

I don't know how to pass the --all option to the rake task, a workaround is to add #:doc: to your private methods: 我不知道如何将--all选项传递给rake任务,一种解决方法是将#:doc:添加到您的私有方法中:

def some_private_method #:doc:
  ...
end

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

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