forked from moul/node-gitlab
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBaseModel.js
More file actions
35 lines (28 loc) · 910 Bytes
/
BaseModel.js
File metadata and controls
35 lines (28 loc) · 910 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
// Generated by CoffeeScript 1.7.1
(function() {
var debug,
__bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; };
debug = require('debug')('gitlab:BaseModel');
module.exports = (function() {
function exports(client) {
this.client = client;
this._init = __bind(this._init, this);
this.load = __bind(this.load, this);
this._init();
}
exports.prototype.load = function(model) {
return require("./Models/" + model)(this.client);
};
exports.prototype._init = function() {
this.debug = require('debug')("gitlab:Models:" + this.constructor.name);
this.get = this.client.get;
this.post = this.client.post;
this.put = this.client.put;
this["delete"] = this.client["delete"];
if (this.init != null) {
return this.init();
}
};
return exports;
})();
}).call(this);