Learn Ruby
Class
19.5
Lesson

What is your class

Ruby allows us to ask an instance what is their class. Let’s ask car1 about what is the name of its class.

Similarly let’s create an instance of Coffeemaker and ask this instance what is the class of this instance.