code: function (scope, path, classFn) {
  
      // Setup scope for each of the subsequent calls.
      if (scope && scope instanceof Scope) {
        this.scope = scope;
      } else {
        throw new TypeError('Scope should inherit from Scope (e.g. EVT.App).');
      }
  
      // Setup path and allow to omit leading '/'.
      if (Utils.isString(path)) {
  
        if (path[0] != '/') {
          path = '/' + path;
        }
        this.path = path;
  
      } else {
        throw new TypeError('Resource must have a String path.');
      }
  
      // Setup class for serializing and deserializing results. It must implement
      // a *toJSON()* method. This method is in the Entity prototype. Since all of our
      // entities inherit from Entity, by default all of them will have this.
      if (Utils.isFunction(classFn)) {
  
        if (Utils.isFunction(classFn.prototype.toJSON)) {
          this['class'] = classFn;
        } else {
          Logger.error('Class for resource "' + path + '" does not implement toJSON().');
        }
  
      } else {
        Logger.info('Class for resource "' + path + '" undefined. It will not return ' +
          'proper Entities nor cascaded Entities.');
      }
  
    }
docs: - _**scope**: scope that owns this resource (`EVT.App`, `EVT.User`)_ - _**path**: relative path to `EVT.settings.apiUrl` of this resource. It can represent a list or a single object (e.g. '/thngs', '/thngs/1')_ - _**classFn**: class of the current resource, used to serialize/deserialize requests/responses. If the response does not need special treatment and the JSON representation is enough, the classFn can be omitted._