// TODO how to satisfy JSDoc so I can have extend documented? I don't
// want a dummy constructor.

/**
 * My namespace.
 * @type Object
 */
//function PM() {};
PM = {};

/**
 * Enables class-based inheritance through constructor and prototype chaining
 * See Kevin's excellent tutorial:
 * http://www.kevlindev.com/tutorials/javascript/inheritance/index.htm
 * See my blog for a comparison of OOP in Java and Ruby compared to OOP
 * in JavaScript
 * using this function http://peter.michaux.ca/articles/2006/06/02/class-based-inheritance-in-javascript
 * @param {Constructor} subclass The constructor function for the class subclass.
 * @param {Constructor} superclass The constructor function for the superclass.
 * @type void
 */
PM.extend = function(subclass, superclass) {
  function Dummy(){}
  Dummy.prototype = superclass.prototype;
  subclass.prototype = new Dummy();
  subclass.prototype.constructor = subclass;
  subclass.superclass = superclass;
  subclass.superproto = superclass.prototype;
};