Created
December 27, 2010 01:47
-
-
Save jaykz52/755790 to your computer and use it in GitHub Desktop.
An example of Coffeescript's inheritance system
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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