1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Complete RDoc namespace change

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15018 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
drbrain 2008-01-13 03:13:37 +00:00
parent 937b7ab8b5
commit ec519b9b43
15 changed files with 45 additions and 46 deletions

View file

@ -57,21 +57,20 @@ module RDoc
Generator = Struct.new(:file_name, :class_name, :key)
##
# This is the list of output generators that we
# support
# This is the list of output generator that we support
GENERATORS = {}
$LOAD_PATH.collect do |d|
File.expand_path d
end.find_all do |d|
File.directory? "#{d}/rdoc/generators"
File.directory? "#{d}/rdoc/generator"
end.each do |dir|
Dir.entries("#{dir}/rdoc/generators").each do |gen|
Dir.entries("#{dir}/rdoc/generator").each do |gen|
next unless /(\w+)\.rb$/ =~ gen
type = $1
unless GENERATORS.has_key? type
GENERATORS[type] = Generator.new("rdoc/generators/#{gen}",
GENERATORS[type] = Generator.new("rdoc/generator/#{gen}",
"#{type.upcase}".intern,
type)
end
@ -266,7 +265,7 @@ module RDoc
require gen.file_name
gen_class = Generators.const_get(gen.class_name)
gen_class = ::RDoc::Generator.const_get gen.class_name
gen = gen_class.for(options)
pwd = Dir.pwd