Rdoc是针对">Ruby源代码的文档系统。Rdoc可以读取源代码文件,分析源代码中的语法信息和注释文本,生成html格式的文档。Ruby的内建库和标准文档都是用RDoc生成的。我们可以用 命令访问。如果用RubyGems来安装Rails的,运行 gem server ,可以看到 (Server started at http://0.0.0.0:8808) 然后我们用浏览器访问http://localhost:8808 rake doc:app 命令可以为Rails项目创建html格式的文档,并将其放在doc/aap目录下 .
rdoc version 3.3 has been released!
* https://github.com/rdoc/rdoc/
* http://rdoc.rubyforge.org/
* https://github.com/rdoc/rdoc/issues
RDoc produces HTML and command-line documentation for Ruby projects. =
RDoc
includes the +rdoc+ and +ri+ tools for generating and displaying online
documentation.
See RDoc for a description of RDoc's markup and basic use.
Changes:
### 3.3 / 2010-01-03
* Minor enhancements
* The coverage report can now report undocumented method parameters
including methods defined in C.
`rdoc -C` gives a standard report, `rdoc -C1` includes
method parameters. Method parameters are considered documented if =
they're
marked-up with +, <code> or <tt>.
* The C parser now uses "*args instead of "=85" if no
call-seq was provided to give names to the arguments.
* Bug fixes
* The C parser now records the file location of aliases, attributes,
constants and methods allowing -C to work on C files.
* Darkfish now handles dots in call-seq allowing ary.insert(index,
obj=85) to display correctly. Patch #6 by KUBO Takehiro.
* Improved processing of meta-programmed methods when followed by =
unparseable
syntax. RubyForge patch #28653 by Aidan Cully.
* rdoc now touches the flag file when it create the output directory.
Prevents the "isn't an RDoc directory" error if rdoc crashes.
* RDoc now properly converts to the expected output encoding. =
RubyForge bug
#28791 by Dzmitry Prakapenka.
* Restored parsing of block comments. RubyForge bug #28668 by Stefano =
Crocco.
* Metaprogrammed methods defined with blocks no longer confuse the =
ruby
parser. RubyForge bug #28370 by Erik Hollensbe.
* ri no longer displays all methods in the inheritance chain.