Video Review: Music Library CLI
Last updated
Last updated
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
22 lines (16 sloc) 1.18 KB
This video lesson uses a review of the Music Libray CLI lab as the basis for a comprehensive look at Object Oriented Ruby. Please do the lab before watching this video to get the most out of it.
Create classes and add class methods for persisting and tracking instances
Define find_by_name class method to find instance with a specific name
Abstract methods to a module to avoid repetitive code
Separate class and instance methods into separate namespaced modules
Use getter methods to expose class variables
Use extended
hook to extend class variables from modules
Define a module with the create_by_name
method to create a new instance of a class
Add setter methods to associate objects to each other
Define and map out our associations
Explain builder mixin and module patterns
<iframe width="100%" height="720" src="" frameborder="0" allowfullscreen></iframe>
View on Learn.co and start learning to code for free.