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 work. You class a method with…

Yahya Gok

Software Engineer

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store