chaplinjs/chaplin — pull request #419 by molily (2013-02-05 09:48:01+00:00)
Title: Support declarative bindings

Views may have a `listen` object with declarative bindings to model, collection, mediator and itself. It works similar to Backbone.View’s `events` hash.

```
class View
listen:
# Listen to view events with @on
'eventName': 'methodName'
# Same as @listenTo @model, …
'change:foo model': 'methodName'
# Same as @listenTo @model, …
'reset collection': 'methodName'
# Same as @subscribeEvent …
'pubSubEvent mediator': 'methodName'
# The value can also be a function:
'eventName': -> alert 'Hello!'
```