method
add_class
v1_9_1_378 -
Show latest stable
- Class:
RDoc::Context
add_class(class_type, name, superclass)public
No documentation available.
# File lib/rdoc/code_objects.rb, line 290
def add_class(class_type, name, superclass)
klass = add_class_or_module @classes, class_type, name, superclass
#
# If the parser encounters Container::Item before encountering
# Container, then it assumes that Container is a module. This
# may not be the case, so remove Container from the module list
# if present and transfer any contained classes and modules to
# the new class.
#
mod = @modules.delete(name)
if mod then
klass.classes_hash.update(mod.classes_hash)
klass.modules_hash.update(mod.modules_hash)
klass.method_list.concat(mod.method_list)
end
return klass
end