Each entry
contains the documentation name (gem name, ‘Ruby Documentation’, etc.), the path
relative to the mount point, whether the documentation exists, the type of
documentation (See RDoc::RI::Paths#each) and the filesystem to the RDoc::Store for the documentation.
# File lib/rdoc/servlet.rb, line 281
def installed_docs
extra_counter = 0
ri_paths.map do |path, type|
store = RDoc::Store.new path, type
exists = File.exist? store.cache_path
case type
when :gem then
gem_path = path[%/([^/]*)/ri$%, 1]
[gem_path, "#{gem_path}/", exists, type, path]
when :system then
['Ruby Documentation', 'ruby/', exists, type, path]
when :site then
['Site Documentation', 'site/', exists, type, path]
when :home then
['Home Documentation', 'home/', exists, type, path]
when :extra then
extra_counter += 1
store.load_cache if exists
title = store.title || "Extra Documentation"
[title, "extra-#{extra_counter}/", exists, type, path]
end
end
end