mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Allow multiple --exclude options to RDoc
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@6084 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
1ba2a61687
commit
c2e07a5219
3 changed files with 14 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue