method
add_class_or_module
v1_9_1_378 -
Show latest stable
- Class:
RDoc::Context
add_class_or_module(collection, class_type, name, superclass=nil)public
No documentation available.
# File lib/rdoc/code_objects.rb, line 375
def add_class_or_module(collection, class_type, name, superclass=nil)
cls = collection[name]
if cls then
cls.superclass = superclass unless cls.module?
puts "Reusing class/module #{name}" if $DEBUG_RDOC
else
cls = class_type.new(name, superclass)
# collection[name] = cls if @document_self && !@done_documenting
collection[name] = cls if !@done_documenting
cls.parent = self
cls.section = @current_section
end
cls
end