/documentation/coffee/fat_arrow.coffee
http://github.com/jashkenas/coffee-script · CoffeeScript · 6 lines · 5 code · 1 blank · 0 comment · 0 complexity · 8459fedacc45aa48316ad9a92adf897f MD5 · raw file
- Account = (customer, cart) ->
- @customer = customer
- @cart = cart
- $('.shopping_cart').on 'click', (event) =>
- @customer.purchase @cart