Created
July 8, 2011 03:10
-
-
Save JasonGiedymin/1071047 to your computer and use it in GitHub Desktop.
Extending Backbone.Model in CoffeeScript
This file contains 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
Backbone = require 'backbone' | |
class Foo extends Backbone.Model | |
set: -> super | |
foo = new Foo | |
foo.set x: 'x' | |
console.log foo.get 'x' # x |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment