Skip to content

Instantly share code, notes, and snippets.

@evilpie
Created July 23, 2010 14:34
Show Gist options
  • Save evilpie/487511 to your computer and use it in GitHub Desktop.
Save evilpie/487511 to your computer and use it in GitHub Desktop.
#current style
class Test:
constructor: (name) ->
@name: name
instancemethod()
@classmethod: (name) ->
"hey" + name
instancemethod: ->
"hey" + @name
#switched
class Test:
constructor: (name) ->
@name: name
@instancemethod()
classmethod: (name) ->
"hey" + name
@instancemethod: ->
"hey" + @name
#::
class Test:
constructor: (name) ->
@name: name
@instancemethod()
classmethod: (name) ->
"hey" + name
::instancemethod: ->
"hey" + @name
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment