Skip to content

Instantly share code, notes, and snippets.

@nthx
Created March 19, 2012 15:20
Show Gist options
  • Save nthx/2116027 to your computer and use it in GitHub Desktop.
Save nthx/2116027 to your computer and use it in GitHub Desktop.
class InviteFriendsUsecase
execute:
bind('click', player.inviteFriends())
class model.Player
inviteFriends: =>
provideFriendsSelectedByMyself(invite)
invite: (newFriends) =>
@friends += newFriends
provideFriendsSelectedByMyself: (afterSelected) =>
friends = [1, 2, 3, 4, 5] #abstract provider, or fake array
afterSelected(friends)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment