matt neuburg <matt / tidbits.com> wrote:

> class BigGuy
>   def setup
>     @favorites = "bluto"
>   end
>   def initialize
>     setup
>     p @favorites
>   end
>   class MiddleGuy < BigGuy
>   end
>   def BigGuy.make_subclass(what)
>     MiddleGuy.class_eval %{
>       def setup
>         @favorites = "#{what}"
>       end
>     }
>     return MiddleGuy
>   end
> end
> 
> class LittleGuy < BigGuy.make_subclass('popeye')
> end

Okay, scratch that. It's fatally flawed. Oh, well. m.

-- 
matt neuburg, phd = matt / tidbits.com, http://www.tidbits.com/matt/
Tiger - http://www.takecontrolbooks.com/tiger-customizing.html
AppleScript - http://www.amazon.com/gp/product/0596102119
Read TidBITS! It's free and smart. http://www.tidbits.com