lib/coberturaReportParser.js
function processClass(clazz, computation) {
  if (!clazz.methods.method) {
    return;
  }
  if (clazz.methods.method instanceof Array) {

    clazz.methods.method.forEach(function(method) {
      ++computation.total;
      // Incremente the total number of methods if there were hits. Don't increment for no hit
      computation.passed = parseInt(method.hits) > 0 ? ++computation.passed : computation.passed;
    });

  } else { // That's the method object itself.
    ++computation.total;
    computation.passed = parseInt(clazz.methods.method.hits) > 0 ? ++computation.passed : computation.passed;
  }
}
function processClass(clazz, computation) {
  if (!clazz.methods.method) {
    return;
  }
  if (clazz.methods.method instanceof Array) {

    clazz.methods.method.forEach(function(method) {
      ++computation.total;
      // Incremente the total number of methods if there were hits. Don't increment for no hit
      computation.passed = parseInt(method.hits) > 0 ? ++computation.passed : computation.passed;
    });

  } else { // That's the method object itself.
    ++computation.total;
    computation.passed = parseInt(clazz.methods.method.hits) > 0 ? ++computation.passed : computation.passed;
  }
}
function processClass ( clazz , computation ) { if ( ! clazz . methods . method ) { return ; } if ( clazz . methods . method instanceof Array ) { clazz . methods . method . forEach ( function ( method ) { ++ computation . total ; // Incremente the total number of methods if there were hits. Don't increment for no hit computation . passed = parseInt ( method . hits ) > 0 ? ++ computation . passed : computation . passed ; } ) ; } else { // That's the method object itself. ++ computation . total ; computation . passed = parseInt ( clazz . methods . method . hits ) > 0 ? ++ computation . passed : computation . passed ; } }
Processes the individual Class and compute totals.

<class>...</class>

@param {Object} clazz is the class object from the report.
@param {Object} computation is the result of the computation.
Processes the individual Class and compute totals .