docs: function createResource(spec) {
      var subResources = spec.has ? __slice.call(spec.has) : null
        , resource = function(/* ..., cb */) {
            var args = __slice.call(arguments)
              , lastArgIsCallback = typeof args[args.length - 1] === 'function'
              , cb = lastArgIsCallback ? args.pop() : null
              , result = spec.constructor.apply(this, args)
  
            if (typeof cb === 'function') {
              this.fetch(cb)
            }
  
            return result
          }
  
      inherits(resource, Resource)
  
      if (subResources) {
        subResources.forEach(function(thing) {
          var fnName = 'fetch' + toTitleCase(thing)
          resource.prototype[fnName] = function(cb) {
            return this.fetchSubResource(thing, cb)
          }
        })
      }
  
      return resource
    }