From: Don Hill Date: 2009-08-26T09:38:08+09:00 Subject: Re: Calling method from another class --001485f27bfc14ad30047200aa69 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Why not just use inheritance or did I miss something class A < B def printA puts = "Class A method" end end A.new.printB On Mon, Aug 24, 2009 at 5:12 PM, Kostas Lps wrote: > Hi guys, > i have 2 classes say class A and class B. How can the A object that i'll > create to call a class B method???? > Say we have this code: > > class A > def printA > puts = "Class A method" > end > end > > class B > def printB > puts "Class B method" > end > end > > I want to make something like this: > a = A.new > a.printB > > I this possible someway??? I dont want to use modules. > > Thanx in advance > Kostas L. > -- > Posted via http://www.ruby-forum.com/. > > --001485f27bfc14ad30047200aa69--