summaryrefslogtreecommitdiff
path: root/lib/rdoc/options.rb
diff options
context:
space:
mode:
authordave <dave@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-04-04 05:03:00 +0000
committerdave <dave@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-04-04 05:03:00 +0000
commit440c26186cf2fe90b9170429f1e33c63c324f4c3 (patch)
tree1505c6664cbb1473e6818577e783e2823b7669b0 /lib/rdoc/options.rb
parent45edb83b9a375eeefb1fc1f13e93a302fc35e8e0 (diff)
Allow multiple --exclude options to RDoc
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6084 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rdoc/options.rb')
-rw-r--r--lib/rdoc/options.rb10
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/rdoc/options.rb b/lib/rdoc/options.rb
index 0d99a5438ec..62c6dabff09 100644
--- a/lib/rdoc/options.rb
+++ b/lib/rdoc/options.rb
@@ -346,7 +346,7 @@ class Options
@show_all = false
@main_page = nil
@marge = false
- @exclude = nil
+ @exclude = []
@quiet = false
@generator_name = 'html'
@generator = generators[@generator_name]
@@ -386,7 +386,7 @@ class Options
when "--all" then @show_all = true
when "--charset" then @charset = arg
when "--debug" then $DEBUG = true
- when "--exclude" then @exclude = Regexp.new(arg)
+ when "--exclude" then @exclude << Regexp.new(arg)
when "--inline-source" then @inline_source = true
when "--line-numbers" then @include_line_numbers = true
when "--main" then @main_page = arg
@@ -473,6 +473,12 @@ class Options
@rdoc_include << "." if @rdoc_include.empty?
+ if @exclude.empty?
+ @exclude = nil
+ else
+ @exclude = Regexp.new(@exclude.join("|"))
+ end
+
check_files
# If no template was specified, use the default