Created
September 9, 2013 14:58
-
-
Save benbabics/6496770 to your computer and use it in GitHub Desktop.
A Pen by benbabics.
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
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