Skip to content

Commit

Permalink
(minor) cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
cloudhead committed May 23, 2010
1 parent fd0c239 commit 2de05cb
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions lib/resourcer/resource.js
Expand Up @@ -81,7 +81,7 @@ this.Resource.view = function (path, params, callback) {
};
this.Resource.find = function (conditions, callback) {
if (typeof(conditions) !== "object") {
throw new(Error)("ArgumentError: `find` takes an object hash");
throw new(TypeError)("`find` takes an object as first argument.");
}
return this._request("find", conditions, callback);
};
Expand Down Expand Up @@ -131,12 +131,9 @@ this.Resource.define = function (schema) {
this.Resource.__defineGetter__('properties', function () {
return this.schema.properties;
});
this.Resource.__defineSetter__('key', function (val) {
return this._key = val;
});
this.Resource.__defineGetter__('key', function () {
return this._key;
});
this.Resource.__defineSetter__('key', function (val) { return this._key = val });
this.Resource.__defineGetter__('key', function () { return this._key });

this.Resource.delegate = function (method, property) {
var that = this;
this[method] = function () {
Expand Down

0 comments on commit 2de05cb

Please sign in to comment.