Test Yourself: Ruby Inheritance

Making sure you've covered everything you need to know for the coming projects.

Scroll down...




Test your knowledge with the questions below. Make sure you can answer them before starting on the projects. All of the answers are contained in the previous lessons.

Classes vs Modules

  • What's the difference between classes and "Modules"?
  • How do you include a module in your project to make its methods usable by the class?
  • How do you make its methods usable by instances instead?

Inheritance, Privacy and Scope

  • What is "Class Inheritance" and why is it useful?
  • What is "Monkey Patching" a class?
  • Can you overwrite inherited methods?
  • How can you call the parent class's version of a method?
  • What is "Scope"?
  • When are scopes created?
  • What is "Method Privacy"?
  • How should a method interact with variables from outside its scope?
  • What is the difference between protected and private methods?

Best Practices for Working With Classes

  • What is "Object Decomposition"?

Refactoring Code

  • What is a "Code Smell"?

Ruby Style Guide

  • What is the basic principle of coding style?

Sign up to track your progress for free

There are ( ) additional resources for this lesson. Check them out!

There are no additional resources for this lesson just yet!

Sorry, comments aren't active just yet!

Next Lesson: Object-Oriented Warmups II