Skip to content

Instantly share code, notes, and snippets.

@paul
Created January 6, 2011 22:26
Show Gist options
  • Save paul/768729 to your computer and use it in GitHub Desktop.
Save paul/768729 to your computer and use it in GitHub Desktop.
class MyClass
one: (callback) ->
console.log "one"
callback "output"
two: () ->
@one (string) ->
console.log string
@one (string) -> # `one` is out of scope here
console.log string
test = new MyClass
test.two()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment