1
0
Fork 0
mirror of https://github.com/jashkenas/coffeescript.git synced 2022-11-09 12:23:24 -05:00

updating docs -- need to get back on the computer that has the syntax highlighter for UV installed

This commit is contained in:
Jeremy Ashkenas 2009-12-30 23:43:55 -05:00
parent b1fa06ff70
commit 7f76c22894
6 changed files with 117 additions and 117 deletions

View file

@ -1,27 +1,27 @@
(function(){
var Animal, Horse, Snake, sam, tom;
Animal = function() {
Animal = function Animal() {
};
Animal.prototype.move = function(meters) {
Animal.prototype.move = function move(meters) {
return alert(this.name + " moved " + meters + "m.");
};
Snake = function(name) {
Snake = function Snake(name) {
return (this.name = name);
};
Snake.__superClass__ = Animal.prototype;
Snake.prototype = new Animal();
Snake.prototype.constructor = Snake;
Snake.prototype.move = function() {
Snake.prototype.move = function move() {
alert("Slithering...");
return Snake.__superClass__.move.call(this, 5);
};
Horse = function(name) {
Horse = function Horse(name) {
return (this.name = name);
};
Horse.__superClass__ = Animal.prototype;
Horse.prototype = new Animal();
Horse.prototype.constructor = Horse;
Horse.prototype.move = function() {
Horse.prototype.move = function move() {
alert("Galloping...");
return Horse.__superClass__.move.call(this, 45);
};