File tree 1 file changed +16
-8
lines changed
1 file changed +16
-8
lines changed Original file line number Diff line number Diff line change @@ -164,7 +164,7 @@ class RDoc::Options
164
164
##
165
165
# Files matching this pattern will be excluded
166
166
167
- attr_accessor :exclude
167
+ attr_writer :exclude
168
168
169
169
##
170
170
# The list of files to be processed
@@ -493,6 +493,20 @@ def encode_with coder # :nodoc:
493
493
end
494
494
end
495
495
496
+ ##
497
+ # Create a regexp for #exclude
498
+
499
+ def exclude
500
+ if @exclude . nil? or Regexp === @exclude then
501
+ # done, #finish is being re-run
502
+ @exclude
503
+ elsif @exclude . empty? then
504
+ nil
505
+ else
506
+ Regexp . new ( @exclude . join ( "|" ) )
507
+ end
508
+ end
509
+
496
510
##
497
511
# Completes any unfinished option setup business such as filtering for
498
512
# existent files, creating a regexp for #exclude and setting a default
@@ -505,13 +519,7 @@ def finish
505
519
root = @root . to_s
506
520
@rdoc_include << root unless @rdoc_include . include? ( root )
507
521
508
- if @exclude . nil? or Regexp === @exclude then
509
- # done, #finish is being re-run
510
- elsif @exclude . empty? then
511
- @exclude = nil
512
- else
513
- @exclude = Regexp . new ( @exclude . join ( "|" ) )
514
- end
522
+ @exclude = self . exclude
515
523
516
524
finish_page_dir
517
525
You can’t perform that action at this time.
0 commit comments