Sha256: d909e80832279da561e2faffc8c1360c84e49e91d8d2226d65d74c5a689057bf

Contents?: true

Size: 859 Bytes

Versions: 1

Compression:

Stored size: 859 Bytes

Contents

_.extend(
  Jazz.Helper,
  {
	  extend: function (protoProps, classProps) {
	    var child = Jazz.Helper.inherits(this, protoProps, classProps);
	    child.extend = this.extend;
	    return child;
	  },

	  ctor: function(){},

	  inherits: function(parent, protoProps, staticProps) {
	    var child;
	    if (protoProps && protoProps.hasOwnProperty('constructor')) {
	      child = protoProps.constructor;
	    } else {
	      child = function(){ return parent.apply(this, arguments); };
	    }

	    _.extend(child, parent);

	    Jazz.Helper.ctor.prototype = parent.prototype;
	    child.prototype = new Jazz.Helper.ctor();

	    if (protoProps) _.extend(child.prototype, protoProps);

	    if (staticProps) _.extend(child, staticProps);

	    child.prototype.constructor = child;

	    child.__super__ = parent.prototype;

	    return child;
	  }
  }
);

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
jazz-jss-0.0.2 dist/jazz/lib/helper.js