code: function addMethod(name, method) {
          if (method !== undefined) {
              methods[name] = method;
          }
          return methods[name];
      }
docs: /*
  Adds a method that will be available to extend the object.
  
  @param {string} name The method name
  @param {function} [method] The handler for the specified method name.
  @return {function} The handler for the specified method name.