Skip to content

Instantly share code, notes, and snippets.

@uris77
Created October 5, 2013 02:00
Show Gist options
  • Save uris77/6835692 to your computer and use it in GitHub Desktop.
Save uris77/6835692 to your computer and use it in GitHub Desktop.
class MultiRenderView
render: ->
_(@)
.chain()
.functions()
.select((f) -> f.indexOf("render") == 0)
.without("render")
.each (f) => @[f]()
class MyView extends MultiRenderView
constructor: (@el) ->
renderDislplay: -> @$el.find('.display').text('L')
renderNumber: -> @$el.find('.display').text('Number')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment