Added ability to display static properties in Haruki template.

This commit is contained in:
Michael Mathews 2010-08-10 18:12:36 +01:00
parent 9c66a00755
commit 684e22f90d

View File

@ -18,8 +18,9 @@
addDocNode(thisNamespace, from, element.path, element.name); addDocNode(thisNamespace, from, element.path, element.name);
} }
else if (element.kind === 'method') { else if (element.kind === 'method') {
var _to = to;
if (element.scope === 'static') { if (element.scope === 'static') {
if (to.constructo) { // like a class if (to.constructor) { // like a class
to = to.constructor; to = to.constructor;
} }
} }
@ -45,8 +46,16 @@
"nullable": typeof element.param[i].nullable === 'boolean'? element.param[i].nullable : "" "nullable": typeof element.param[i].nullable === 'boolean'? element.param[i].nullable : ""
}); });
} }
to = _to;
} }
else if (element.kind === 'property') { else if (element.kind === 'property') {
var _to = to;
if (element.scope === 'static') {
if (to.constructor) { // like a class
to = to.constructor;
}
}
if (! to.properties) { if (! to.properties) {
to.properties = {}; to.properties = {};
} }
@ -56,6 +65,7 @@
"description" : element.desc || "", "description" : element.desc || "",
"type": element.type? (element.type.length === 1? element.type[0] : element.type) : "" "type": element.type? (element.type.length === 1? element.type[0] : element.type) : ""
}; };
to = _to;
} }
else if (element.kind === 'constructor') { else if (element.kind === 'constructor') {
if (! to.classes) { if (! to.classes) {