Object-Oriented Programming II

Extend Your Knowledge

Whereas include mixes a module's methods in at the instance level (allowing instances of a particular class to use the methods), the extend keyword mixes a module's methods at the class level. This means that class itself can use the methods, as opposed to instances of the class.


Check out the code in the editor. We've extended TheHereAnd with ThePresent, allowing it to use the now method. Click Run to see the effect!

Community Forums
Get help and ask questions in the Codecademy Forums
Report a Bug
If you see a bug or any other issue with this page, please report it here.