Pre-release
AdventureJS Docs Downloads
Score: 0 Moves: 0
// set.js

(function () {
  /* global AdventureJS A */

  var p = AdventureJS.Dictionary.prototype;

  /**
   * Provides a chainable shortcut method for setting a number of properties on the instance.
   *
   * @memberOf AdventureJS.Dictionary
   * @method AdventureJS.Dictionary#set
   * @param {Object} props A generic object containing properties to copy to the DisplayObject instance.
   * @returns {AdventureJS.Dictionary} Returns the instance the method is called on (useful for chaining calls.)
   * @chainable
   */
  p.set = function Dictionary_set(props) {
    if (props != null) {
      for (var n in props) {
        this[n] = props[n];
      }
    }
    return this;
  };
})();