My apologies for resending but there were some formatting errors in the
I just switched to Ruby and came across it.
If we have to make a class method private then we should write it as:
class<<self private def fun p "hello" end end
But if we write as:
private def self.fun p "hello" end
then the class method is not private but behaves as public.
So, is it a carefully designed functionality? If so, then what is the
thinking behind it?
OR any other reasons behind it?
Somebody told me that ruby encourages to define class methods the first
But I think that if you are giving more than one methods to do a thing,
then all should function the same way.
Thanks and Regards,