Created
March 13, 2012 13:52
-
-
Save nthx/2028882 to your computer and use it in GitHub Desktop.
god_systems_usecase_2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#async/callbacks ignored for clarity of example | |
class WatchItemUsecase | |
constructor: (@ebay, @seller) -> | |
execute: (item) => | |
try | |
@ebay.seller_wants_to_watch_item(@seller, item) | |
catch AlreadyWatching | |
alert 'Youre already watching this item' | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment