Skip to content
Browse files

make files

  • Loading branch information...
1 parent 95acc7b commit 94cb648804ed7ec4e098f8187a70d7df2c39c14b @fat fat committed Apr 5, 2011
Showing with 7 additions and 7 deletions.
  1. +6 −6 klass.js
  2. +1 −1 klass.min.js
View
12 klass.js
@@ -19,7 +19,6 @@
return extend.call(typeof o == f ? o : noop, o, 1);
}
-
function wrap(k, fn, supr) {
return function () {
var tmp = this.supr;
@@ -42,6 +41,7 @@
}
function extend(o, fromSub) {
+ noop[proto] = this[proto];
var supr = this,
prototype = new noop(),
isFunction = typeof o == f,
@@ -50,6 +50,9 @@
fn = function () {
fromSub || isFn(o) && supr.apply(this, arguments);
_constructor.apply(this, arguments);
+ if (this.initialize) {
+ this.initialize.apply(this, arguments);
+ }
};
fn.methods = function (o) {
@@ -59,6 +62,7 @@
};
fn.methods.call(fn, _methods).prototype.constructor = fn;
+
fn.extend = arguments.callee;
fn[proto].implement = fn.statics = function (o, optFn) {
o = typeof o == 'string' ? (function () {
@@ -70,10 +74,6 @@
return this;
};
- if (isFunction) {
- process(fn[proto], this.prototype, supr);
- }
-
return fn;
}
@@ -88,4 +88,4 @@
context.klass = klass;
}
-}(this, 'function');
+}(this, 'function');
View
2 klass.min.js
@@ -5,4 +5,4 @@
* Follow our software http://twitter.com/dedfat :)
* MIT License
*/
-!function(a,b){function j(a,c){var g=this,h=new d,j=typeof a==b,k=j?a:this,l=j?{}:a,m=function(){c||f(a)&&g.apply(this,arguments),k.apply(this,arguments)};m.methods=function(a){i(h,a,g),m[e]=h;return this},m.methods.call(m,l).prototype.constructor=m,m.extend=arguments.callee,m[e].implement=m.statics=function(a,b){a=typeof a=="string"?function(){var c={};c[a]=b;return c}():a,i(this,a,g);return this},j&&i(m[e],this.prototype,g);return m}function i(a,d,f){for(var g in d)d.hasOwnProperty(g)&&(a[g]=typeof d[g]==b&&typeof f[e][g]==b&&c.test(d[g])?h(g,d[g],f):d[g])}function h(a,b,c){return function(){var d=this.supr;this.supr=c[e][a];var f=b.apply(this,arguments);this.supr=d;return f}}function g(a){return j.call(typeof a==b?a:d,a,1)}var c=/xyz/.test(function(){xyz})?/\bsupr\b/:/.*/,d=function(){},e="prototype",f=function(a){return typeof a===b};if(typeof module!="undefined"&&module.exports)module.exports=g;else{var k=g;g.noConflict=function(){a.klass=g;return this},a.klass=g}}(this,"function")
+!function(a,b){function j(a,c){d[e]=this[e];var g=this,h=new d,j=typeof a==b,k=j?a:this,l=j?{}:a,m=function(){c||f(a)&&g.apply(this,arguments),k.apply(this,arguments),this.initialize&&this.initialize.apply(this,arguments)};m.methods=function(a){i(h,a,g),m[e]=h;return this},m.methods.call(m,l).prototype.constructor=m,m.extend=arguments.callee,m[e].implement=m.statics=function(a,b){a=typeof a=="string"?function(){var c={};c[a]=b;return c}():a,i(this,a,g);return this};return m}function i(a,d,f){for(var g in d)d.hasOwnProperty(g)&&(a[g]=typeof d[g]==b&&typeof f[e][g]==b&&c.test(d[g])?h(g,d[g],f):d[g])}function h(a,b,c){return function(){var d=this.supr;this.supr=c[e][a];var f=b.apply(this,arguments);this.supr=d;return f}}function g(a){return j.call(typeof a==b?a:d,a,1)}var c=/xyz/.test(function(){xyz})?/\bsupr\b/:/.*/,d=function(){},e="prototype",f=function(a){return typeof a===b};if(typeof module!="undefined"&&module.exports)module.exports=g;else{var k=g;g.noConflict=function(){a.klass=g;return this},a.klass=g}}(this,"function")

0 comments on commit 94cb648

Please sign in to comment.
Something went wrong with that request. Please try again.