Coffeescriptのコンストラクタからメソッドを呼び出すことはできますか?
Coffeescriptのコンストラクタからメソッドを呼び出す
class Animal
constructor: (@name) ->
move()
move: (meters) ->
alert @name + " moved #{meters}m."
class Snake extends Animal
move: ->
alert "Slithering..."
super 5
sam = new Snake "Sammy the Python"
これは、次のエラーメッセージ「にReferenceErrorを:移動が定義されていない」発生していることが可能である