Skip to content

Instantly share code, notes, and snippets.

@benbabics
Created September 9, 2013 14:58
Show Gist options
  • Save benbabics/6496770 to your computer and use it in GitHub Desktop.
Save benbabics/6496770 to your computer and use it in GitHub Desktop.
A Pen by benbabics.
class Foo
constructor: ->
@name = 'one'
initialize: ->
alert 'foo'
getName: ->
alert @name
class Bar extends Foo
constructor: ->
super
@name = 'two'
initialize: ->
super
alert 'bar'
class Baz extends Bar
constructor: ->
super
@name = 'three'
initialize: ->
super
alert 'baz'
baz = new Baz()
baz.initialize()
baz.getName()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment