doxy/node/generators/ternjs/generator.js
function GENERATE_CLASSES(classes) {
  var docs = {};
  _.each(classes, function(classSpec, parentClass) {
    var constructor =  classSpec.methods[parentClass];
    _.extend(docs, GENERATE_METHOD(parentClass, constructor ? constructor : { params: {}, return: {}, description: '' } ));
    if (_.has(docs, parentClass)) {
      _.each(classSpec.enums, function(enumSpec, enumName) {
        _.extend(docs[parentClass], GENERATE_ENUM(enumName, enumSpec));
      });
      docs[parentClass].prototype = {};
      _.each(_.omit(classSpec.methods, parentClass), function(methodSpec, methodName) {
        _.extend(docs[parentClass].prototype, GENERATE_METHOD(methodName, methodSpec));
      });
      _.each(classSpec.variables, function(variableSpec, variableName) {
        _.extend(docs[parentClass].prototype, GENERATE_VARIABLE(variableName, variableSpec));
      });
    }
  });
  return docs;
}
function GENERATE_CLASSES(classes) {
  var docs = {};
  _.each(classes, function(classSpec, parentClass) {
    var constructor =  classSpec.methods[parentClass];
    _.extend(docs, GENERATE_METHOD(parentClass, constructor ? constructor : { params: {}, return: {}, description: '' } ));
    if (_.has(docs, parentClass)) {
      _.each(classSpec.enums, function(enumSpec, enumName) {
        _.extend(docs[parentClass], GENERATE_ENUM(enumName, enumSpec));
      });
      docs[parentClass].prototype = {};
      _.each(_.omit(classSpec.methods, parentClass), function(methodSpec, methodName) {
        _.extend(docs[parentClass].prototype, GENERATE_METHOD(methodName, methodSpec));
      });
      _.each(classSpec.variables, function(variableSpec, variableName) {
        _.extend(docs[parentClass].prototype, GENERATE_VARIABLE(variableName, variableSpec));
      });
    }
  });
  return docs;
}
function GENERATE_CLASSES ( classes ) { var docs = { } ; _ . each ( classes , function ( classSpec , parentClass ) { var constructor = classSpec . methods [ parentClass ] ; _ . extend ( docs , GENERATE_METHOD ( parentClass , constructor ? constructor : { params : { } , return : { } , description : '' } ) ) ; if ( _ . has ( docs , parentClass ) ) { _ . each ( classSpec . enums , function ( enumSpec , enumName ) { _ . extend ( docs [ parentClass ] , GENERATE_ENUM ( enumName , enumSpec ) ) ; } ) ; docs [ parentClass ] . prototype = { } ; _ . each ( _ . omit ( classSpec . methods , parentClass ) , function ( methodSpec , methodName ) { _ . extend ( docs [ parentClass ] . prototype , GENERATE_METHOD ( methodName , methodSpec ) ) ; } ) ; _ . each ( classSpec . variables , function ( variableSpec , variableName ) { _ . extend ( docs [ parentClass ] . prototype , GENERATE_VARIABLE ( variableName , variableSpec ) ) ; } ) ; } } ) ; return docs ; }
generate the spec for the given list of classes
generate the spec for the given list of classes