2014-06-30 シングルトン JavaScript class SummonTewi tewi = null class Tewi talk: -> console.log 'ああもう、私になんの用があるっていうのよ' @get: -> if tewi? console.log 'もういるってば!' tewi else tewi = new Tewi tewi.talk() SummonTewi.get() SummonTewi.get() ああもう、私になんの用があるっていうのよ もういるってば!