This file contains hidden or 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 Singleton | |
@get: -> @instance ?= new @ | |
class Test extends Singleton | |
constructor: -> alert "Test constructed" | |
run: -> alert "Test run" | |
class OtherTest extends Singleton | |
constructor: -> alert "OtherTest constructed" | |
run: -> alert "OtherTest run" |