Created
July 15, 2011 14:10
-
-
Save OiNutter/1084753 to your computer and use it in GitHub Desktop.
OiNutter.co.uk - Obscura - CoffeeScript Scope Example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function() { | |
var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }; | |
object(function() { | |
this.prop = 'foo'; | |
return this.bar = __bind(function(newProp) { | |
return this.prop = newProp; | |
}, this); | |
}); | |
}).call(this); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
object -> | |
@prop = 'foo' | |
@bar = (newProp) => | |
@prop = newProp |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment