Created
July 19, 2015 17:35
-
-
Save Aurora0000/00e1acd4105041819632 to your computer and use it in GitHub Desktop.
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
use reflection; | |
class Animal { | |
func Animal (self, name) { | |
self.name = name; | |
} | |
func canBark (self) { | |
reflection.hasAttribute (self, "bark"); | |
} | |
} | |
class Dog : Animal { | |
func Dog (self) { | |
super ("Dog"); | |
} | |
func bark (self) { | |
print ("Woof!"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment