If you are asking for a “ruby” way, then you should put your classes in separate files. As some others mentioned, placing your classes in separate files scales better. If you put several classes in the same file and they begin to grow, you will have to separate them later.
So why not separate them from the start?
UPDATE
I should also mention that autoload works, expecting the classes to be in their files. For example, if you are in a Rails environment and do not split classes into different files, you must explicitly specify the require file. A better place for this would be in the application.rb file. I know that you are not in a Rails environment, but for others who may find this answer, this information may be useful.
UPDATE2
By “autoload,” I meant Rails autoload. If you set up your own autoload, you can put the classes in the same file; but then again, why? Typically, the Ruby and Java communities expect classes to be in separate files. The only exceptions are nested classes, but for more advanced design patterns.
source share