Method: RDoc::Context#add_module
- Defined in:
- lib/rdoc/code_object/context.rb
#add_module(class_type, name) ⇒ Object
Adds a module named name. If RDoc already knows name is a class then that class is returned instead. See also #add_class.
506 507 508 509 510 511 512 513 514 |
# File 'lib/rdoc/code_object/context.rb', line 506 def add_module(class_type, name) mod = @classes[name] || @modules[name] return mod if mod full_name = child_name name mod = @store.modules_hash[full_name] || class_type.new(name) add_class_or_module mod, @modules, @store.modules_hash end |