class Common
instance = null
@$: ->
instance ?= new Private()
class Private
constructor: ()->
..content of class..
ASの時と同じ。
静的変数instanceへのアクセスを@$()メソッドに絞る。
@$()はいわゆるgetInstance()
Go to list of users who liked
More than 5 years have passed since last update.
class Common
instance = null
@$: ->
instance ?= new Private()
class Private
constructor: ()->
..content of class..
ASの時と同じ。
静的変数instanceへのアクセスを@$()メソッドに絞る。
@$()はいわゆるgetInstance()
Register as a new user and use Qiita more conveniently
Go to list of users who liked