Czy można wywołać metodę z konstruktora w Coffeescript?
np.Wywołanie metody z konstruktora w 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"
To generuje następujący komunikat o błędzie „ReferenceError: ruch nie jest zdefiniowana”