matt-kragen / lookup_chain_exercise

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Ruby Lookup Chain Exercise

Activity 1

Examine the code in this repository and diagram the Object Model for a Chair instance.

Activity 2

The Chair class has several superclasses and modules where Ruby can look for methods. At the bottom of the chair.rb file, a new instance of chair is created and the chair_type method is called on that instance. Your job is to comment out sections of the code in order to get chair_type to print each of the following:

  1. "method"
  2. "class"
  3. "module"
  4. "superclass"
  5. "superclass's module"
  6. "superclass's superclass"

About


Languages

Language:Ruby 100.0%