From: Bruce Williams Date: 2003-04-04T22:08:13+09:00 Subject: Re: Plugins (sort off) On Thursday 03 April 2003 06:25 pm, Damphyr wrote: | Well I *am* new to Ruby, been playing around for about three weeks now | (well, whenever I can think after work anyway) and while playing around | I put together a very primitive (in my opinion) way of making plugins. | Well calling it plugins probably is the wrong thing to do - let's say | that I like distributing my code in small files all over the place | because I hate scrolling and I like putting it together again | programmatically. This may not address your question-- but certainly the easiest way I've ever seen plugins accomplished in Ruby follows the following (fairly popular) pattern: --snip-- class Plugin AVAILABLE = [] def Plugin.inherited plugin_class AVAILABLE << plugin_class end end class PluginA < Plugin; end class PluginB < Plugin; end class PluginC < Plugin; end --snip-- If you're looking for an advanced plugin framework for Ruby, I'd suggest you check out FreeBase (http://www.rubyide.org/cgi-bin/wiki.pl?FreeBASE), which is really sweet. Hope that helps, // Bruce ( who's odd enough to think that a YAML type for ruby-lang posts/replies would be awesome )