A class in Ruby contains all the specifications needed to create objects. It is like a blueprint for creating objects with each object as its own individual item, with its own data and id. A blueprint for a house contains the information on how to build a house, but a…