Skip to content

Instantly share code, notes, and snippets.

@chantastic
Created September 2, 2014 06:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chantastic/0b0ed9b09582b90b8ce8 to your computer and use it in GitHub Desktop.
Save chantastic/0b0ed9b09582b90b8ce8 to your computer and use it in GitHub Desktop.
CoffeeScript Private Methods
class WithPrivate
constructor: (name)->
name = name
@getName = =>
name
@setName = (newName) =>
name = newName
aPublicMethod: =>
name # 'undefined'
@chantastic
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment