Skip to content

Instantly share code, notes, and snippets.

@sxross
Created November 27, 2011 20:00
Show Gist options
  • Save sxross/1398061 to your computer and use it in GitHub Desktop.
Save sxross/1398061 to your computer and use it in GitHub Desktop.
Band Model (Backbone.js / Coffeescript)
$ ->
bands = null
class Band extends Backbone.Model
initialize: ->
console.log "initializing model #{@inspect()}"
inspect: ->
console.log "inspect"
s = []
for a, v of @
unless typeof(v) is 'function'
str = "#{a}=#{v}"
s.push(str)
"#{s.join(", ")}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment