From: Sur Date: 2008-01-08T21:15:40+09:00 Subject: Defining a function inside a function. Whats this feature ? How to use inside a class ? ------=_Part_21409_7302988.1199794544849 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi Everyone, I am not sure if I have seen it being used earlier or probably I don't know how to use it. when I define function(s) inside a function within the main object, it works... def person def author p "I am author" end def reader p "I am reader" end end Now, if I call person.author # => I am author person.reader # => I am reader And it works fine with any hierarchy. The same thing doesn't seem to work inside a class. Any explanation ? Thanks! -- sur "is a String object" is a String object hacking over objects http://expressica.com ------=_Part_21409_7302988.1199794544849--