Skip to content

Instantly share code, notes, and snippets.

@jaykz52
Created December 27, 2010 01:47
Show Gist options
  • Save jaykz52/755790 to your computer and use it in GitHub Desktop.
Save jaykz52/755790 to your computer and use it in GitHub Desktop.
An example of Coffeescript's inheritance system
class Vehicle
drive: ->
alert "The vehicle moves forward!"
class Motorcyle extends Vehicle
drive: ->
alert "The Motorcyle moves forward!"
class Car extends Vehicle
drive: ->
alert "The car moves forward!"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment