RocketChat/Rocket.Chat.Ops

View on GitHub
hubots/hubot-gitsy/src/gitlab/lib/Models/BaseModel.js

Summary

Maintainability
A
1 hr
Test Coverage
// Generated by CoffeeScript 1.6.3
(function() {
  var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; };

  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("./" + model)(this.client);
    };

    exports.prototype._init = function() {
      this.debug = this.client.debug;
      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);