def summary
calculate
num_width = [@num_files, @num_items].max.to_s.length
undoc_width = [
@undoc_attributes,
@undoc_classes,
@undoc_constants,
@undoc_items,
@undoc_methods,
@undoc_modules,
@undoc_params,
].max.to_s.length
report = []
report << 'Files: %*d' % [num_width, @num_files]
report << nil
report << 'Classes: %*d (%*d undocumented)' % [
num_width, @num_classes, undoc_width, @undoc_classes]
report << 'Modules: %*d (%*d undocumented)' % [
num_width, @num_modules, undoc_width, @undoc_modules]
report << 'Constants: %*d (%*d undocumented)' % [
num_width, @num_constants, undoc_width, @undoc_constants]
report << 'Attributes: %*d (%*d undocumented)' % [
num_width, @num_attributes, undoc_width, @undoc_attributes]
report << 'Methods: %*d (%*d undocumented)' % [
num_width, @num_methods, undoc_width, @undoc_methods]
report << 'Parameters: %*d (%*d undocumented)' % [
num_width, @num_params, undoc_width, @undoc_params] if
@coverage_level > 0
report << nil
report << 'Total: %*d (%*d undocumented)' % [
num_width, @num_items, undoc_width, @undoc_items]
report << '%6.2f%% documented' % percent_doc
report << nil
report << 'Elapsed: %0.1fs' % (Time.now - @start)
report.join "\n"
end