def report_class_module cm
return if cm.fully_documented? and @coverage_level.zero?
return unless cm.display?
report = []
if cm.in_files.empty? then
report << "# #{cm.definition} is referenced but empty."
report << '#'
report << '# It probably came from another project. ' \
"I'm sorry I'm holding it against you."
report << nil
return report
elsif cm.documented? then
documented = true
report << "#{cm.definition} # is documented"
else
report << '# in files:'
cm.in_files.each do |file|
report << "# #{file.full_name}"
end
report << nil
report << "#{cm.definition}"
end
body = yield.flatten
return if body.empty? and documented
report << nil << body unless body.empty?
report << 'end'
report << nil
report
end