Ruby – The “Initialize” method

This is the c# equivalent of the constructur method.


I have released my new course on Udemy, Kubernetes By Example. Sign up now to get free lifetime access!

In c# you don’t have to explicitly define the constructor class, because it by default already implicitly specified in every class that you define, however in Ruby you do have to explicitly define it.

Also you invoke the initialize method by calling a special reserved method called “new”