mirror of
https://github.com/ruby/ruby.git
synced 2025-09-17 01:23:57 +02:00
Merge from HEAD.
Add --system, --site, --home, --gems to ri. Allow --doc-dir to be specified multiple times. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@10405 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
74831046c7
commit
4e23c46ff4
11 changed files with 158 additions and 85 deletions
|
@ -1,5 +1,6 @@
|
|||
require 'rdoc/usage'
|
||||
require 'rdoc/ri/ri_paths'
|
||||
require 'rdoc/usage'
|
||||
require 'rdoc/ri/ri_cache'
|
||||
require 'rdoc/ri/ri_util'
|
||||
require 'rdoc/ri/ri_reader'
|
||||
|
@ -21,20 +22,18 @@ class RiDriver
|
|||
|
||||
@options.parse(args)
|
||||
|
||||
paths = @options.paths || RI::Paths::PATH
|
||||
if paths.empty?
|
||||
report_missing_documentation(paths)
|
||||
end
|
||||
@ri_reader = RI::RiReader.new(RI::RiCache.new(paths))
|
||||
@display = @options.displayer
|
||||
end
|
||||
|
||||
# Couldn't find documentation in paths, so tell the user
|
||||
# what to do
|
||||
path = @options.path
|
||||
report_missing_documentation @options.raw_path if path.empty?
|
||||
|
||||
def report_missing_documentation(paths)
|
||||
@ri_reader = RI::RiReader.new(RI::RiCache.new(path))
|
||||
@display = @options.displayer
|
||||
end
|
||||
|
||||
# Couldn't find documentation in +path+, so tell the user what to do
|
||||
|
||||
def report_missing_documentation(path)
|
||||
STDERR.puts "No ri documentation found in:"
|
||||
paths.each do |d|
|
||||
path.each do |d|
|
||||
STDERR.puts " #{d}"
|
||||
end
|
||||
STDERR.puts "\nWas rdoc run to create documentation?\n\n"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue