Ruby is a class-based object-oriented programming language. Meaning that every object is an instance of a class, and a class defines the state (variables) and behaviours (methods) of an object. An object is an entity with state and behaviour, as defined by its class.
Object is an instance of a class which allows you to use the classes attributes and methods. Object is the default root of all Ruby objects. Everything in Ruby is an object, including classes. An object in code is a thing with all the data and all the logic required to complete a task. Objects are models and metaphors for the problems we solve in code. Ruby comes with a few types of Objects to get us started, things like Integer, String, Array, etc. We call these base types of Objects “Primitives.” But what if we wanted to create a new type in our programming universe, a new kind of object for our code? That’s what the class keyword and object orientation allows us to do.
Class is a type of structure of information and code. A Ruby class is an object of class Class, which contains all the object things plus a list of methods and a reference to a superclass. A class is the blueprint from which individual objects are created.
A module is a collection of methods and constants. They hold methods, like classes but they can’ t be instantiated. It is not possible to create objects from a module. Modules are useful when we have methods that want to reuse in certain classes