Skip to content

Instantly share code, notes, and snippets.

@devongovett
Created July 17, 2010 19:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save devongovett/479762 to your computer and use it in GitHub Desktop.
Save devongovett/479762 to your computer and use it in GitHub Desktop.
class Animal
move: (meters) ->
alert @name + " moved " + meters + "m."
class Snake extends Animal
constructor: (name) ->
@name: name
move: (distance) ->
alert "Slithering..."
super # this calls super, passing all arguments automatically
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment