From: Michael Guterl Date: 2006-09-05T09:27:43+09:00 Subject: Re: How do I create an instance of a class in another rb file ------=_Part_36219_2159919.1157416059306 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline On 9/4/06, brian.kejser@protexis.com wrote: > > Hi > > What happens if there is more than one class in 'one.rb'? require 'one' will load the entire one.rb file. -----Original Message----- > From: "Michael Guterl" > Sent: Mon, September 4, 2006 16:45 > To: "ruby-talk ML" > Subject: Re: How do I create an instance of a class in another rb file > > On 9/4/06, brian.kejser@protexis.com wrote: > > > > Hi > > > > I have two rb files in the same folder. > > > > The first file is one.rb and defines an instanciable class named 'One'. > > The second file is two.rb and needs to create an instance of class 'One' > > as defined in one.rb. > > > > How do I import the class 'One' into two.rb? > > > Assuming the only class defined in one.rb is 'One' then you should be able > to do: > require 'one' > > Thanks > > > > > > > > > > > Michael Guterl > > > > ------=_Part_36219_2159919.1157416059306--