From: Stefano Crocco Date: 2012-01-22T05:48:53+09:00 Subject: Re: What's wrong with this? Il giorno Sun, 22 Jan 2012 05:37:10 +0900 Paet Worlds II ha scritto: > Stefano Crocco wrote in post #1041949: > > Il giorno Sun, 22 Jan 2012 04:56:33 +0900 > > Paet Worlds II ha scritto: > > > >> > >> puts "Initialized!" > >> So why is it that when I run this, nothing happens? Nothing is > >> printed... > >> > > > > You create an object of class Initialization and assign it to the > > constant > > Init. The only methods which are called is Initialization#initialize, > > called > > from Initialize.new. Since you haven't defined it, Object#initialize is > > used > > instead and it does nothing. > > > > I guess what you want is to also create an instance of RoboEngine, after > > creating the Initialization object: > > > > Init = Initialization.new > > robo = RoboEngine.new > > > > I hope this helps > > > > Stefano > > Thank you both so much!! But could you please give me a very basic > explanation as to why it did not work before? o,o > > -Thanks a ton! > Because the only methods which print something on the screen are RoboEngine#initialize and Initialization#action1, and you didn't call any of them. Stefano