code: function (hash, val) {
              var key,
                value,
                element = this.element,
                hasSetSymbolSize,
                ret = this,
                skipAttr;
  
              // single key-value pair
              if (typeof hash === 'string' && val !== UNDEFINED) {
                  key = hash;
                  hash = {};
                  hash[key] = val;
              }
  
              // used as a getter: first argument is a string, second is undefined
              if (typeof hash === 'string') {
                  ret = (this[hash + 'Getter'] || this._defaultGetter).call(this, hash, element);
  
                  // setter
              } else {
  
                  for (key in hash) {
                      value = hash[key];
                      skipAttr = false;
  
  
  
                      if (this.symbolName && /^(x|y|width|height|r|start|end|innerR|anchorX|anchorY)/.test(key)) {
                          if (!hasSetSymbolSize) {
                              this.symbolAttr(hash);
                              hasSetSymbolSize = true;
                          }
                          skipAttr = true;
                      }
  
                      if (this.rotation && (key === 'x' || key === 'y')) {
                          this.doTransform = true;
                      }
  
                      if (!skipAttr) {
                          (this[key + 'Setter'] || this._defaultSetter).call(this, value, key, element);
                      }
  
                      // Let the shadow follow the main element
                      if (this.shadows && /^(width|height|visibility|x|y|d|transform|cx|cy|r)$/.test(key)) {
                          this.updateShadows(key, value);
                      }
                  }
  
                  // Update transform. Do this outside the loop to prevent redundant updating for batch setting
                  // of attributes.
                  if (this.doTransform) {
                      this.updateTransform();
                      this.doTransform = false;
                  }
  
              }
  
              return ret;
          }
docs: Set or get a given attribute
  @param {Object|String} hash
  @param {Mixed|Undefined} val