From: Morton Goldberg Date: 2006-12-26T04:44:13+09:00 Subject: Re: including a namespace for just one class On Dec 25, 2006, at 12:20 PM, S. Robert James wrote: > I would like to reference constants and classes defined in module > People in the class Schedule. > > class Login is not part of any module (other than the root). > > doing this: > class Schedule > include People > def a_method > # Worker.new won't work > People::Worker.new # works > end > end > > Is there a way to include the module People so that I don't need to > prefix People:: for only one particular class? I don't know why it doesn't work for you -- it works fine for me. module People class Worker end end class Schedule include People def a_method p Worker.new end end Schedule.new.a_method # Regards, Morton