Created
January 16, 2011 22:43
-
-
Save mynyml/782227 to your computer and use it in GitHub Desktop.
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 | |
@bar: -> 'bar' | |
# baz: -> Foo.bar() | |
baz: -> @constructor.bar() | |
class Boo extends Foo | |
@bar: -> 'moo' | |
console.log Boo.bar() #=> "moo" | |
console.log new Boo().baz() #=> "moo" (would have been "bar" with baz: -> Foo.bar()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment