From: Eric Armstrong Date: 2006-07-14T10:18:00+09:00 Subject: Module Definition Idioms Looking at HTree, I see a few more things that seem weird to me, but which are probably perfectly normal Ruby: file: parse.rb -------------- module HTree def HTree.parse ... def def HTree.parse_xml ... end ... def Text.parse_cdata_section(raw_string) ... end def Comment.parse(raw_string) ... end end # module --------------- This is all very strange and new to me. There are a dozen files, each of which adds to the "HTree" module, and in each module, methods are added to several classes. What makes that a desirable way to structure things? In the Java world, each class is in its own file. What are the advantages of doing things this way, instead?