Adds attribute if not already there. If it is (as method(s) or
attribute), updates the comment if it was empty.

The attribute is registered only if it defines a new method. For instance,
attr_reader :foo will not be registered if method
foo exists, but attr_accessor :foo will be
registered if method foo exists, but foo= does
not.

Adds the class or module mod to the modules or classes Hash
self_hash, and to all_hash (either
TopLevel::modules_hash or
TopLevel::classes_hash), unless done_documenting is
true. Sets the parent of mod to
self, and its section to current_section. Returns
mod.

# File rdoc/context.rb, line 1174defupgrade_to_classmod, class_type, enclosingenclosing.modules_hash.deletemod.nameklass = RDoc::ClassModule.from_moduleclass_type, modklass.store = @store# if it was there, then we keep it even if done_documenting@store.classes_hash[mod.full_name] = klassenclosing.classes_hash[mod.name] = klassklassend