Patrick Gundlach wrote:
> Hello,
> 
> another 'best practice' question. Example: I have a library which I 
> think should go into
> 
> lib/foo/bar/baz.rb
> 
> Should I use 'module ... ' wrappers  to reflect the directory structure? 
> I.e.
> 
> module Foo
>   module Bar
>      class Baz
>      end
>   end
> end
> 
> I'd like to be a good ruby-citizen. My personal preference though would 
> be something different:
> 
> module Baz
>   class SomethingElse
>   end
> end
> 
> so the scope would be
> 
> s=Baz::SomethingElse.new

The latter is fine. So long as your top-level namespace is
unique (i.e. the name of your project, hopefully), the
underlying structure is inconsequential.

> Patrick


-- 
Posted via http://www.ruby-forum.com/.