Some more carpet action today!
Modules are a bit like classes but can't have subclasses and can't create instances of themselves.
However you can include a module in one ore even several classes if you want to use the module's methods on the classes' instances.
If you use extend instead of include it adds the module's method to the class itself.
Don't own a flying carpet, only a regular one? Hate vacuum cleaning it? Freddie knows exactly how you feel...
- we made the carpet flip when changing directions
- the background now scrolls down automatically (although we don't fully understand the code yet...)
Modules are a bit like classes but can't have subclasses and can't create instances of themselves.
However you can include a module in one ore even several classes if you want to use the module's methods on the classes' instances.
If you use extend instead of include it adds the module's method to the class itself.
Don't own a flying carpet, only a regular one? Hate vacuum cleaning it? Freddie knows exactly how you feel...