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
class SomeAjaxCallback | |
constructor: (@value) -> | |
throw "Bad value" unless value? | |
setTimeout @process, 5000 | |
# setTimeout doesn't give us a "new context" | |
# so we'd get our "global context" : window. | |
# let's avoid that using the fat arrow. | |
process: => | |
throw "Wrong context" unless @value? |