def auto_class_directive_bound_to_app(app):
class AutoClassDirective(JsDirective):
"""js:autoclass directive, which spits out a js:class directive
Takes a single argument which is a JS class name combined with an
optional formal parameter list for the constructor, all mashed together
in a single string.
"""
option_spec = JsDirective.option_spec.copy()
option_spec.update({
'members': lambda members: [m.strip() for m in members.split(',')]
if members else [],
'exclude-members': _members_to_exclude,
'private-members': flag})
def run(self):
return AutoClassRenderer.from_directive(self, app).rst_nodes()
return AutoClassDirective
评论列表
文章目录