Skip to content

Instantly share code, notes, and snippets.

@nthx
Created March 13, 2012 13:47
Show Gist options
  • Save nthx/2028860 to your computer and use it in GitHub Desktop.
Save nthx/2028860 to your computer and use it in GitHub Desktop.
god_systems_usecase_1
#async/callbacks ignored for clarity of example
class ListItemUsecase
constructor: (@ebay, @seller) ->
execute: (listing_definition) =>
answer = @ebay.list_items(@seller, @ebay)
if answer.listing_is_valid()
alert('ok - item was scheduled for listing')
return
else
alert('correct listing details...#{answer.errors}' )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment