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;
  };
})();