Method Lookup in Ruby

This week, I would like to talk about Ruby’s ancestor tree. I was just curious that how methods are invoked in Ruby by order. I mean that which class method comes first to invoke and second and goes on. Let’s look at together step by step.

Singleton Methods

Singleton methods that are defined on only a single object. For example;

We have MyClass object class(below picture) and outside of this class we make a new instance which belongs to this class, and make this instance’s method called instance.my_method which this is how singleton class…