← 返回命令列表

Linux command

rdoc 命令

文件

复制后可按需替换文件名、目录或参数。

常用示例

Generate documentation

rdoc [file.rb]

Generate for directory

rdoc [lib/]

Generate with title

rdoc --title "[Project Name]" [lib/]

Output to directory

rdoc -o [doc/] [lib/]

Show help for class

ri [Array]

说明

RDoc generates documentation from Ruby source files. It parses comments and code structure to create HTML documentation or ri data files.

参数

-o, --output _dir_
Output directory.
--title _text_
Documentation title.
-f, --format _format_
Output format (html, ri).
-m, --main _file_
Main page file.
-x, --exclude _pattern_
Exclude files.
-a, --all
Include all methods.

FAQ

What is the rdoc command used for?

RDoc generates documentation from Ruby source files. It parses comments and code structure to create HTML documentation or ri data files.

How do I run a basic rdoc example?

Run `rdoc [file.rb]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -o, --output _dir_ do in rdoc?

Output directory.