Function.implement('Invoke', | |
function(args){ | |
var tmp = Class.instantiate(this); | |
var init = this.prototype.initialize; | |
if(init){ | |
init.apply(tmp,$splat(args)); | |
} | |
return tmp; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This comment has been minimized.
with this little modification if a single element is passed throught it $splat that into an Array :)