Josh Cheek wrote:
> Hi, not completely sure I understand what you are trying to do, but 
> Robert's post got me interested, and I wanted to try it out.
> This is what I came up with: http://gist.github.com/294520
>
> module Command
> [...]
>   def self.included( base )
>     @registered_commands << base
>   end

And when using a base class instead of a module, one could use the 
Class#inherited hook (that's the route Ben Bleything, above, took in 
'linen').

>
> cmd_class  =  class_name.classify.constantize

Better let each command tell us its name, or names. It allows for 
several names (aliases) for a command.
-- 
Posted via http://www.ruby-forum.com/.