Class: ModuleDoc
Represents the top-level fileoverview documentation.
Methods
get (self, tag_name, default='')
Return the value of a particular tag, or None if that tag doesn't exist. Use 'doc' for the comment body itself.
get_as_list (self, tag_name)
Return the value of a tag, making sure that it's a list. Absent tags are returned as an empty-list; single tags are returned as a one-element list.
The returned list is a copy, and modifications do not affect the original object.
to_dict (self)
Return this ModuleDoc as a dict. In addition to CommentDoc defaults, this has:
- name: The module name.
- dependencies: A list of immediate dependencies.
- all_dependencies: A list of all dependencies.
to_html (self, codebase)
Convert this to HTML.
to_json (self)
Return a JSON representation of the CommentDoc. Keys are as per to_dict.
Properties
author
Return the author of this module, as a string.
dependencies
Returns the immediate dependencies of a module (only those that are explicitly declared). Use the all_dependencies field for transitive dependencies - the FileDoc must have been created by a CodeBaseDoc for this field to exist.
>>> FileDoc('', read_file('examples/module_closure.js')).module.dependencies
['module.js']
>>> FileDoc('subclass.js', read_file('examples/subclass.js')).module.dependencies
['module_closure.js', 'class.js']
doc
Return the comment body.
license
Return the license of this module, as as string.
name
Always return 'file_overview'.
organization
Return the organization that developed this, as as string.
see
Return a list of all @see tags on the comment.
url
Return a URL for the comment, within the page.
version
Return the version of this module, as as string.