adding delete jt service

This commit is contained in:
Jared Tabor
2015-03-27 14:03:16 -04:00
parent 1afeed3588
commit 2401865f59
6 changed files with 68 additions and 17 deletions
+9
View File
@@ -35,10 +35,19 @@ RestStub.prototype =
return this.deferred.promise;
},
destroy: function() {
this.deferred = this.deferred || {};
this.deferred.destroy = this[this.currentUrl];
return this.deferred.destroy.promise;
},
succeedAt: function(url, value) {
assertUrlDeferred(url, this);
this[url].resolve(value);
},
succeedOn: function(method, value) {
this.deferred[method] = value;
},
succeed: function(value) {
this.deferred.resolve(value);
},