CoffeeScript

プロパティとメソッドの頭の@はstaticって感じなのね。

class MyClass

  @classProp: "aaaaa"

  instanceProp: "bbbbb"

  constructor: (prop) ->
    @instanceProp = prop

  @classMethod: () ->
    @classProp = "ddddd"
    console.log @classProp
    "return"

  instanceMethod: () ->
    console.log @instanceProp
    "return"

mc = new MyClass "ccccc"
mc.instanceMethod()
MyClass.classMethod()