Method: RDoc::Context#upgrade_to_class

Defined in:
lib/rdoc/code_object/context.rb

#upgrade_to_class(mod, class_type, enclosing) ⇒ Object

Upgrades NormalModule mod in enclosing to a class_type



1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
# File 'lib/rdoc/code_object/context.rb', line 1249

def upgrade_to_class mod, class_type, enclosing
  enclosing.modules_hash.delete mod.name

  klass = RDoc::ClassModule.from_module class_type, mod
  klass.store = @store

  # if it was there, then we keep it even if done_documenting
  @store.classes_hash[mod.full_name] = klass
  enclosing.classes_hash[mod.name]   = klass

  klass
end