class RDoc::Options

def template_dir_for template

def template_dir_for template
  template_path = File.join 'rdoc', 'generator', 'template', template
  $LOAD_PATH.map do |path|
    File.join File.expand_path(path), template_path
  end.find do |dir|
    File.directory? dir
  end
end