Skip to content

Commit

Permalink
SCDoc: Ignore some more methods by default.
Browse files Browse the repository at this point in the history
The set of methodnames to ignore by default is now a classvar of SCDocParser.
Note that this only means that those methods will not show up as "undocumented methods",
but you can still document them explicitly if you want to.
(cherry picked from commit 5c7bac7)
  • Loading branch information
lijon committed Feb 20, 2012
1 parent 118018e commit 6d61355
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions SCClassLibrary/SCDoc/SCDocParser.sc
Expand Up @@ -14,6 +14,11 @@ SCDocParser {
var <>currentFile;
var <methodList, <keywordList;
classvar copyMethodCache;
classvar ignoreMethods;

*initClass {
ignoreMethods = IdentitySet[\categories, \init, \checkInputs, \new1, \argNamesInputsOffset, \initClass, \storeArgs, \storeOn, \printOn];
}

init {
root = tree = List.new;
Expand Down Expand Up @@ -426,7 +431,7 @@ SCDocParser {
l = Array.new;
(mets = c.methods) !? {
//ignore these methods by default. Note that they can still be explicitly documented.
docmets = docmets | IdentitySet[\categories, \init, \checkInputs, \new1, \argNamesInputsOffset];
docmets = docmets | ignoreMethods;
mets.collectAs({|m|m.name.asGetter},IdentitySet).do {|name|
if(docmets.includes(name).not) {
l = l.add("_"++pfx++name.asString);
Expand Down Expand Up @@ -555,7 +560,7 @@ SCDocParser {

(mets = class.methods) !? {
//ignore these methods by default. Note that they can still be explicitly documented.
docmets = docmets | IdentitySet[\categories, \init, \checkInputs, \new1, \argNamesInputsOffset];
docmets = docmets | ignoreMethods;
syms = mets.collectAs({|m|m.name.asGetter},IdentitySet);
syms.do {|name|
if(docmets.includes(name).not) {
Expand Down

0 comments on commit 6d61355

Please sign in to comment.