Module: Modified Output

by darcyclarke

JavaScript

// Generated by CoffeeScript 1.3.3
var Base, Module, base,
  __hasProp = {}.hasOwnProperty,
  __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };

Module = (function() {

  function Module() {}
    Module.include = function(mixin) {
        var temp = new Function("mixin", "ctor", "return function " + mixin.name + "(){ mixin(); ctor(); };")(mixin, this.__super__.constructor), key, value, reference;
        temp = __extends(temp, this.__super__.constructor);
        reference = mixin.prototype;
        for(key in reference){
          value = reference[key];
          temp.prototype[key] = value;
        }
        for(key in mixin) {
          value = mixin[key];
          temp[k] = value;
        }
        return __extends(this, temp);
    };
    
    return Module;
    
})();


///////////////////////////////////////////
// Base Module
///////////////////////////////////////////
Base = (function(_super) {
   
       
  __extends(Base, _super);
  Base.include(Backbone.View);
    
  function Base() {
    console.log('Base construct');
  }

  return Bace;

})(Module);

// Test Modules
base = new Base;
console.log(base);