class RDoc::Stats

def report_methods cm

def report_methods cm
  return if cm.method_list.empty?
  report = []
  cm.each_method do |method|
    next if method.documented? and @coverage_level.zero?
    if @coverage_level > 0 then
      params, undoc = undoc_params method
      @num_params += params
      unless undoc.empty? then
        @undoc_params += undoc.length
        undoc = undoc.map do |param| "+#{param}+" end
        param_report = "  # #{undoc.join ', '} is not documented\n"
      end
    end
    next if method.documented? and not param_report
    line = method.line ? ":#{method.line}" : nil
    scope = method.singleton ? 'self.' : nil
    report << "  # in file #{method.file.full_name}#{line}\n"
    report << param_report if param_report
    report << "  def #{scope}#{method.name}#{method.params}; end\n"
    report << "\n"
  end
  report
end