class RDoc::Options

def finish

def finish
  if @write_options then
    write_options
    exit
  end
  @op_dir ||= 'doc'
  root = @root.to_s
  if @rdoc_include.empty? || !@rdoc_include.include?(root)
    @rdoc_include << root
  end
  @exclude = self.exclude
  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