jsdoc/templates/default/tmpl/method.tmpl
2011-02-27 20:36:41 +00:00

74 lines
1.7 KiB
Cheetah

<dt id="<?js= longname ?>">
<h4 class="name" id="<?js= name ?>"><?js= this.attribs + (kind == 'class'? 'new ':'') + name + this.signature ?></h4>
<?js if (this.summary) { ?>
<p class="summary"><?js= summary ?></p>
<?js } ?>
</dt>
<dd>
<?js if (this.description) { ?>
<p class="description">
<?js= this.description ?>
</p>
<?js } ?>
<?js print(render('details.tmpl', this)); ?>
<?js
if (this['this']) {
print('<h5>This:</h5>');
print( '<ul><li>'+linkto(this['this'], this['this'])+'</li></ul>' );
}
?>
<?js
if (this.params && params.length) {
print('<h5>Parameters:</h5>');
print( render('params.tmpl', params) );
}
?>
<?js if (this.fires && fires.length) { ?>
<h5>Fires:</h5>
<ul><?js
fires.forEach(function(f) {
print( render('fires.tmpl', f) );
});
?></ul>
<?js } ?>
<?js if (this.exceptions && exceptions.length) { ?>
<h5>Throws:</h5>
<ul><?js
exceptions.forEach(function(e) {
print( render('exceptions.tmpl', e) );
});
?></ul>
<?js } ?>
<?js
if (this.returns && returns.length) {
var rdesc = [];
returns.forEach(function(r) {
if (r.description) rdesc.push(r.description);
});
if (rdesc.length) {
print('<h5>Returns:</h5>');
print('<p>'+rdesc.join('</p><p>')+'</p>');
}
}
?>
<?js
if (this.examples && examples.length) {
print('<h5>Example' + (examples.length > 1? 's':'') + '</h5>');
print( render('examples.tmpl', examples) );
}
?>
</dd>