Completes any unfinished option setup business such as filtering for
existent files, creating a regexp for #exclude and setting a default
#template.
# File lib/rdoc/options.rb, line 501
def finish
@op_dir ||= 'doc'
@rdoc_include << "." if @rdoc_include.empty?
root = @root.to_s
@rdoc_include << root unless @rdoc_include.include?(root)
if @exclude.nil? or Regexp === @exclude then
# done, #finish is being re-run
elsif @exclude.empty? then
@exclude = nil
else
@exclude = Regexp.new(@exclude.join("|"))
end
finish_page_dir
check_files
# If no template was specified, use the default template for the output
# formatter
unless @template then
@template = @generator_name
@template_dir = template_dir_for @template
end
if @locale_name
@locale = RDoc::I18n::Locale[@locale_name]
@locale.load(@locale_dir)
else
@locale = nil
end
self
end