calculate()public
Calculates documentation totals and percentages for classes, modules, constants, attributes and methods.
# File lib/rdoc/stats.rb, line 110
def calculate
return if @doc_items
ucm = @store.unique_classes_and_modules
classes = @store.unique_classes.reject { |cm| cm.full_name == 'Object' }
constants = []
ucm.each { |cm| constants.concat cm.constants }
methods = []
ucm.each { |cm| methods.concat cm.method_list }
attributes = []
ucm.each { |cm| attributes.concat cm.attributes }
@num_attributes, @undoc_attributes = doc_stats attributes
@num_classes, @undoc_classes = doc_stats classes
@num_constants, @undoc_constants = doc_stats constants
@num_methods, @undoc_methods = doc_stats methods
@num_modules, @undoc_modules = doc_stats @store.unique_modules
@num_items =
@num_attributes +
@num_classes +
@num_constants +
@num_methods +
@num_modules +
@num_params
@undoc_items =
@undoc_attributes +
@undoc_classes +
@undoc_constants +
@undoc_methods +
@undoc_modules +
@undoc_params
@doc_items = @num_items - @undoc_items
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