Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
CoffeeScript Private Methods
class WithPrivate
constructor: (name)->
name = name
@getName = =>
@setName = (newName) =>
name = newName
aPublicMethod: =>
name # 'undefined'

This comment has been minimized.

Copy link
Owner Author

@chantastic chantastic commented Sep 2, 2014

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