Generates the documentation body
(self)
| 439 | return md.data() |
| 440 | |
| 441 | def gen_body(self): |
| 442 | """Generates the documentation body""" |
| 443 | md = MarkdownFile() |
| 444 | md.first_title() |
| 445 | for module_name in sorted(self.master_dict): |
| 446 | module = self.master_dict[module_name] |
| 447 | module_key = module_name |
| 448 | # Generate class doc (if any) |
| 449 | if valid_dic_val(module, 'classes'): |
| 450 | for cl in sorted(module['classes'], key = lambda i: i['class_name']): |
| 451 | class_name = cl['class_name'] |
| 452 | class_key = join([module_key, class_name], '.') |
| 453 | current_title = module_name+'.'+class_name |
| 454 | md.title(2, join([current_title,'<a name="'+current_title+'"></a>'])) |
| 455 | inherits = '' |
| 456 | if valid_dic_val(cl, 'parent'): |
| 457 | inherits = italic(create_hyperlinks(cl['parent'])) |
| 458 | md.inherit_join(inherits) |
| 459 | # Class main doc |
| 460 | if valid_dic_val(cl, 'doc'): |
| 461 | md.textn(create_hyperlinks(md.prettify_doc(cl['doc']))) |
| 462 | # Generate instance variable doc (if any) |
| 463 | if valid_dic_val(cl, 'instance_variables'): |
| 464 | md.title_html(3, 'Instance Variables') |
| 465 | for inst_var in cl['instance_variables']: |
| 466 | add_doc_inst_var(md, inst_var, class_key) |
| 467 | # Generate method doc (if any) |
| 468 | if valid_dic_val(cl, 'methods'): |
| 469 | md.title_html(3, 'Methods') |
| 470 | for method in cl['methods']: |
| 471 | add_doc_method(md, method, class_key) |
| 472 | md.separator() |
| 473 | return md.data().strip() |
| 474 | |
| 475 | def gen_markdown(self): |
| 476 | """Generates the whole markdown file""" |
no test coverage detected