Created
March 10, 2010 18:30
-
-
Save probablycorey/328178 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| waxClass{"Store"} | |
| function milk() | |
| -- milk is added to Store, so you can call it with Store.milk() | |
| puts "milk called" | |
| end | |
| function eggs(self) | |
| -- eggs takes a self arg, but you could still call it as a class | |
| -- method Store:eggs(). Store would be passed in as self | |
| -- | |
| -- You could also call it like an instance method | |
| -- Store:init():eggs(). An instance of Store would be passed in as self | |
| puts "eggs called" | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment