Hi. Take the following code, best save it locally in your editor:
puts “Hello from Test1”
puts “Hello from Test2”
class << self
puts “Hello from Test3”
The output is the same in all cases. I understand that when using this
in a class, there is a difference between private and non-private calls.
But my question has not to do with inheritance. Instead, do these 3
things do the same as far as a module is concerned, if you would only
it as a standalone-module? Because the output is the same.
Right now it seems as if all 3 things do the same and I am confused why
we have 3 ways…