r/coffeescript • • May 19 '11

Singletons in Coffeescript

http://blog.meltingice.net/programming/singletons-coffeescript/
4 Upvotes

4 comments sorted by

View all comments

Show parent comment

2

u/MustRapeDeannaTroi May 28 '11

Actually, you would set a default value like this:

class User
  constructor : (@name = 'User') ->