method
report_class_module
v2_6_3 -
Show latest stable
- Class:
RDoc::Stats
report_class_module(cm)public
Returns a report on undocumented items in ClassModule cm
# File lib/rdoc/stats.rb, line 277
def report_class_module cm
return if cm.fully_documented? and @coverage_level.zero?
return unless cm.display?
report = RDoc::Markup::Document.new
if cm.in_files.empty? then
report << RDoc::Markup::Paragraph.new("#{cm.definition} is referenced but empty.")
report << RDoc::Markup::Paragraph.new("It probably came from another project. I'm sorry I'm holding it against you.")
return report
elsif cm.documented? then
documented = true
klass = RDoc::Markup::Verbatim.new("#{cm.definition} # is documented\n")
else
report << RDoc::Markup::Paragraph.new('In files:')
list = RDoc::Markup::List.new :BULLET
cm.in_files.each do |file|
para = RDoc::Markup::Paragraph.new file.full_name
list << RDoc::Markup::ListItem.new(nil, para)
end
report << list
report << RDoc::Markup::BlankLine.new
klass = RDoc::Markup::Verbatim.new("#{cm.definition}\n")
end
klass << "\n"
body = yield.flatten # HACK remove #flatten
if body.empty? then
return if documented
klass.parts.pop
else
klass.parts.concat body
end
klass << "end\n"
report << klass
report
end Related methods
- Instance methods
- add_alias
- add_attribute
- add_class
- add_constant
- add_file
- add_method
- add_module
- begin_adding
- calculate
- coverage_level=
- doc_stats
- done_adding
- fully_documented?
- great_job
- percent_doc
- report
- report_attributes
- report_class_module
- report_constants
- report_methods
- summary
- undoc_params
- Class methods
- new