Skip to content

Instantly share code, notes, and snippets.

@Aurora0000
Created July 19, 2015 17:35
Show Gist options
  • Save Aurora0000/00e1acd4105041819632 to your computer and use it in GitHub Desktop.
Save Aurora0000/00e1acd4105041819632 to your computer and use it in GitHub Desktop.
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