From: Robert Klemme Date: 2006-08-14T01:45:14+09:00 Subject: Re: Modules -> do I have is straight? Eero Saynatkari wrote: >> Also, I am not quite sure I understand how namespaces works in ruby. >> In java you create a package ( i know you all know this already I am >> just saying it for my benefit) to place related classes in. Say for >> example com.jenkins.util.MyFancyClass. If I want to use this class in >> another package com.jenkins.library any classs in library would just >> import it. How does this work in ruby? >> Most of the code I have seen is in the same class or at least the same >> direcctory. Is it typical for ruby applications to create a package >> structure similar to a java app? > > The namespace, unlike in Java, is in no way enforced and it > cannot be used to resolve a file's location in the filesystem. Note that in Java this is in no way enforced either - just the convention is more ubiquitous because default class loaders implement it. If you have the proper class loader you can lump all class files into a single directory. Kind regards robert