Generates a referenced index for markdown file
(self)
| 405 | self.master_dict[module_name]['classes'].append(new_module) |
| 406 | |
| 407 | def gen_overview(self): |
| 408 | """Generates a referenced index for markdown file""" |
| 409 | md = MarkdownFile() |
| 410 | md.title(3, 'Overview') |
| 411 | for module_name in sorted(self.master_dict): |
| 412 | module = self.master_dict[module_name] |
| 413 | module_key = '#' + module_name |
| 414 | md.list_pushn( |
| 415 | brackets(bold(module_key[1:])) + |
| 416 | parentheses(module_key) + ' ' + |
| 417 | sub(italic('Module'))) |
| 418 | # Generate class overview (if any) |
| 419 | if 'classes' in module and module['classes']: |
| 420 | for cl in sorted(module['classes']): |
| 421 | class_name = cl['class_name'] |
| 422 | class_key = join([module_key, class_name], '.') |
| 423 | md.list_pushn(join([ |
| 424 | brackets(bold(class_name)), |
| 425 | parentheses(class_key), ' ', |
| 426 | sub(italic('Class'))])) |
| 427 | # Generate class instance variables overview (if any) |
| 428 | if 'instance_variables' in cl and cl['instance_variables']: |
| 429 | for inst_var in cl['instance_variables']: |
| 430 | md.list_push(gen_inst_var_indx(inst_var, class_key)) |
| 431 | md.list_popn() |
| 432 | # Generate class methods overview (if any) |
| 433 | if 'methods' in cl and cl['methods']: |
| 434 | for method in cl['methods']: |
| 435 | md.list_push(gen_method_indx(method, class_key)) |
| 436 | md.list_popn() |
| 437 | md.list_pop() |
| 438 | md.list_pop() |
| 439 | return md.data() |
| 440 | |
| 441 | def gen_body(self): |
| 442 | """Generates the documentation body""" |
nothing calls this directly
no test coverage detected