251 Private method to generate the section listing all classes of the |
251 Private method to generate the section listing all classes of the |
252 module. |
252 module. |
253 |
253 |
254 @return The classes list section. (string) |
254 @return The classes list section. (string) |
255 """ |
255 """ |
256 names = sorted(self.module.classes.keys()) |
256 names = sorted(self.module.classes) |
257 if names: |
257 if names: |
258 self.empty = False |
258 self.empty = False |
259 s = self.__genListSection(names, self.module.classes) |
259 s = self.__genListSection(names, self.module.classes) |
260 else: |
260 else: |
261 s = TemplatesListsStyleCSS.listEntryNoneTemplate |
261 s = TemplatesListsStyleCSS.listEntryNoneTemplate |
266 Private method to generate the section listing all modules of the file |
266 Private method to generate the section listing all modules of the file |
267 (Ruby only). |
267 (Ruby only). |
268 |
268 |
269 @return The modules list section. (string) |
269 @return The modules list section. (string) |
270 """ |
270 """ |
271 names = sorted(self.module.modules.keys()) |
271 names = sorted(self.module.modules) |
272 if names: |
272 if names: |
273 self.empty = False |
273 self.empty = False |
274 s = self.__genListSection(names, self.module.modules) |
274 s = self.__genListSection(names, self.module.modules) |
275 else: |
275 else: |
276 s = TemplatesListsStyleCSS.listEntryNoneTemplate |
276 s = TemplatesListsStyleCSS.listEntryNoneTemplate |
281 Private method to generate the section listing all functions of the |
281 Private method to generate the section listing all functions of the |
282 module. |
282 module. |
283 |
283 |
284 @return The functions list section. (string) |
284 @return The functions list section. (string) |
285 """ |
285 """ |
286 names = sorted(self.module.functions.keys()) |
286 names = sorted(self.module.functions) |
287 if names: |
287 if names: |
288 self.empty = False |
288 self.empty = False |
289 s = self.__genListSection(names, self.module.functions) |
289 s = self.__genListSection(names, self.module.functions) |
290 else: |
290 else: |
291 s = TemplatesListsStyleCSS.listEntryNoneTemplate |
291 s = TemplatesListsStyleCSS.listEntryNoneTemplate |
296 Private method to generate the document section with details about |
296 Private method to generate the document section with details about |
297 classes. |
297 classes. |
298 |
298 |
299 @return The classes details section. (string) |
299 @return The classes details section. (string) |
300 """ |
300 """ |
301 classNames = sorted(self.module.classes.keys()) |
301 classNames = sorted(self.module.classes) |
302 classes = [] |
302 classes = [] |
303 for className in classNames: |
303 for className in classNames: |
304 _class = self.module.classes[className] |
304 _class = self.module.classes[className] |
305 supers = _class.super |
305 supers = _class.super |
306 supers = ", ".join(supers) if len(supers) > 0 else "None" |
306 supers = ", ".join(supers) if len(supers) > 0 else "None" |
419 @return method list and method details section (tuple of two string) |
419 @return method list and method details section (tuple of two string) |
420 """ |
420 """ |
421 methList = [] |
421 methList = [] |
422 methBodies = [] |
422 methBodies = [] |
423 methods = sorted( |
423 methods = sorted( |
424 k for k in obj.methods.keys() if obj.methods[k].modifier == modifierFilter |
424 k for k in obj.methods if obj.methods[k].modifier == modifierFilter |
425 ) |
425 ) |
426 if "__init__" in methods: |
426 if "__init__" in methods: |
427 methods.remove("__init__") |
427 methods.remove("__init__") |
428 try: |
428 try: |
429 methBody = TemplatesListsStyleCSS.constructorTemplate.format( |
429 methBody = TemplatesListsStyleCSS.constructorTemplate.format( |
499 Private method to generate the document section with details about |
499 Private method to generate the document section with details about |
500 Ruby modules. |
500 Ruby modules. |
501 |
501 |
502 @return The Ruby modules details section. (string) |
502 @return The Ruby modules details section. (string) |
503 """ |
503 """ |
504 rbModulesNames = sorted(self.module.modules.keys()) |
504 rbModulesNames = sorted(self.module.modules) |
505 rbModules = [] |
505 rbModules = [] |
506 for rbModuleName in rbModulesNames: |
506 for rbModuleName in rbModulesNames: |
507 rbModule = self.module.modules[rbModuleName] |
507 rbModule = self.module.modules[rbModuleName] |
508 globalsList = self.__genGlobalsListSection(rbModule) |
508 globalsList = self.__genGlobalsListSection(rbModule) |
509 methList, methBodies = self.__genMethodSection( |
509 methList, methBodies = self.__genMethodSection( |
549 @param obj Reference to the object being formatted. |
549 @param obj Reference to the object being formatted. |
550 @param modName Name of the Ruby module containing the classes. (string) |
550 @param modName Name of the Ruby module containing the classes. (string) |
551 @return The classes list and classes details section. |
551 @return The classes list and classes details section. |
552 (tuple of two string) |
552 (tuple of two string) |
553 """ |
553 """ |
554 classNames = sorted(obj.classes.keys()) |
554 classNames = sorted(obj.classes) |
555 classes = [] |
555 classes = [] |
556 for className in classNames: |
556 for className in classNames: |
557 _class = obj.classes[className] |
557 _class = obj.classes[className] |
558 supers = _class.super |
558 supers = _class.super |
559 supers = ", ".join(supers) if len(supers) > 0 else "None" |
559 supers = ", ".join(supers) if len(supers) > 0 else "None" |