adding '::' as shorthand for '.prototype.'

This commit is contained in:
Jeremy Ashkenas
2010-01-10 16:16:59 -05:00
parent 902febb43a
commit ad18378f7e
10 changed files with 59 additions and 36 deletions

View File

@@ -1,21 +1,21 @@
Base: =>
Base.prototype.func: string =>
Base::func: string =>
'zero/' + string
FirstChild: =>
FirstChild extends Base
FirstChild.prototype.func: string =>
FirstChild::func: string =>
super('one/') + string
SecondChild: =>
SecondChild extends FirstChild
SecondChild.prototype.func: string =>
SecondChild::func: string =>
super('two/') + string
ThirdChild: =>
this.array: [1, 2, 3]
ThirdChild extends SecondChild
ThirdChild.prototype.func: string =>
ThirdChild::func: string =>
super('three/') + string
result: (new ThirdChild()).func('four')