A
amit saxena
"> The Module#private method only works for instance methods,
My question is, why is it so? What's the advantage in it?
Amit
class<<self
private
def fun
p "hello"
end
end
end
class Abc
private
def self.fun
p "hello"
end
end
not for class
method."
My question is, why is it so? What's the advantage in it?
Amit
class AbcFrom: Stefano Crocco <[email protected]>
Subject: Re: private class methods- functionality or shortcoming?
To: "ruby-talk ML" <[email protected]>
Date: Monday, June 9, 2008, 7:39 PM
class<<self
private
def fun
p "hello"
end
end
end
class Abc
private
def self.fun
p "hello"
end
end