From: John Gabriele Date: 2006-08-09T05:05:14+09:00 Subject: Re: application structure On 8/8/06, Trans wrote: > > John Gabriele wrote: > > > If you start creating subdirectories in your lib dir, I don't think > > the classes therein need to have any relationship to the other > > classes. You would simply note the extra directory in your require > > statements in your code: "require 'vecmath/matrix'", require > > 'crystal/tetrahedron'", or whatever. The subdirectories are only there > > to help you keep organized, and aren't required. > > Not so. You should be thoughtful about what you put in the toplevel. > It's very easy to wipe out someone elses file this way. In general you > should ALWAYS put your files in a subdir named after your project. And > if need be, have one .rb file with the same name that the lib's user > can require. Sorry for being unclear: Everything I wrote in my post refers to your own app's lib directory. For example, if I do all my work in /home/john/dev/ruby, and my project is called "gemstones", then my project directory will be /home/john/dev/ruby/gemstones, and might contain stuff such as: gemstones/ bin/ conf/ data/ docs/ lib/ gemstones.rb vecmath/ point.rb vector.rb matrix.rb crystal/ tetrahedron.rb test/ ... ---John