From: Trans Date: 2006-12-20T11:25:07+09:00 Subject: Re: File layout best practices for extensions Robert Au wrote: > I'm implementing a module Foo, with classes Foo::W, Foo::X, Foo::Y, and > Foo::Z. For various reasons, it is easier to code key parts of Foo::W and > Foo::X in C, but the remainder of the code is easier to write in > Ruby. Most applications that use this module will need all four > classes. What's the best way to lay out the code for use? I assume that > there should be a top-level Foo.rb that users can require and that > requires the appropriate .so and .rb files, but is it worth having > > require "Foo/W.so" > require "Foo/X.so" > require "Foo/W.rb" > require "Foo/X.rb" > require "Foo/Y.rb" > require "Foo/Z.rb" > > in Foo.rb? If so, how does one write an extconf.rb to build W.so and X.so > in the same directory? (Or am I forced to keep the sources for those two > in separate directories, or hand-edit the Makefile?) trying to think of a project or tow you might have al ook at for an example -- maybe ruby-libxml (http://libxml.rubyforge.org/). t.