Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
README.md
ruby-object-model_notes.pdf

README.md

LESSON: ruby-object-model


2018-07-06

OBJECTIVES

  • Give two reasons why inheritance and Mixins are desirable.
  • Write a mixin.
  • Describe the difference between inheritance, composition, and mixins.

VOCABULARY

  • Inheritance - When one classes gains functionality from another
  • Composition - Complex objects being built from less complex objects
  • Mixin - Reusable blocks of code

NOTES

  • If an object is-another object, you want inheiritance
  • if an object has-a object, you want composition
  • if an object behaves-as other objects you want a mixin