Skip to content

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
class @A
my_function: => alert 'my function!'
A_Function_Alias: @::my_function
usage_of_alias: =>
@A_Function_Alias()
# some other code...
var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; };
this.A = (function() {
function A() {
this.usage_of_alias = __bind(this.usage_of_alias, this);
this.my_function = __bind(this.my_function, this);
}
A.prototype.my_function = function() {
return alert('my function!');
};
A.prototype.A_Function_Alias = A.prototype.my_function;
A.prototype.usage_of_alias = function() {
return this.A_Function_Alias();
};
return A;
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.