Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions README.rdoc
Original file line number Diff line number Diff line change
@@ -53,11 +53,8 @@ To generate documentation programmatically:
gem 'rdoc'
require 'rdoc/rdoc'

options = RDoc::Options.new
# see RDoc::Options

rdoc = RDoc::RDoc.new
rdoc.document options
rdoc.document([]) # This generates documentation for all files in the current directory
Copy link
Member

@tompng tompng Mar 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about this?

options = RDoc::Options.new
options.files = ['./a.rb', './b.rb']
options.setup_generator 'darkfish'
# see RDoc::Options for more setups

rdoc = RDoc::RDoc.new
rdoc.document options

Some example of options setups are in TestRDocRDoc#test_document

# see RDoc::RDoc

You can specify the target files for document generation with +.document+ file in the project root directory.