onsi/cocktail — pull request #1 by teleological (2012-09-22 01:43:35+00:00)
Title: Support override of non-function properties?

I ran into a problem with Cocktail where a mixin which defined url() was applied to a Backbone Collection that defined a url as a string: Cocktail raised an exception when trying to apply() the colliding string. This patch makes it possible to override non-function properties in the prototype with mixin functions. If mixin functions collide but don't return a defined value, the prototype property value is returned. The behavior of ignoring non-function properties in mixins (excepting "events") is unchanged. Thanks for Cocktail!