method
add_class_or_module

add_class_or_module(collection, class_type, name, superclass=nil)
public
Hide source
# File lib/rdoc/code_objects.rb, line 279 def add_class_or_module(collection, class_type, name, superclass=nil) cls = collection[name] if cls puts "Reusing class/module #{name}" if $DEBUG else cls = class_type.new(name, superclass) puts "Adding class/module #{name} to #@name" if $DEBUG # collection[name] = cls if @document_self && !@done_documenting collection[name] = cls if !@done_documenting cls.parent = self cls.section = @current_section end cls end