From: Hugh Sasse Date: 2008-11-11T00:17:42+09:00 Subject: Re: Problem with object methods? On Mon, 10 Nov 2008, Carter Davis wrote: > Okay, I made an example. I suggest you change it like this to see what is going on. > puts "before class : #{self.inspect}" > class FirstClass > def initialize > puts "YAY INITIALIZE!" puts "in initialize : #{self.inspect}" > end > puts "inside class : #{self.inspect}" > text # I'd have expected an error for that call to test. try # commenting it out for now... > > def text > puts "Yay more text!" puts "inside test method : #{self.inspect}" > end > end > > firstClass = FirstClass.new firstClass.test > > Now, when I run this, it only uses the initialize method, not the text > method. Is there any way that I can use the text method? > -- > Posted via http://www.ruby-forum.com/. > Hugh