Ravil Bayramgalin
11/3/2007 6:07:00 PM
> Exactly that was why I thaught of delegation, as I am not familiar
> with the delegation idioms please forgive me that I handcoded it
>
> class Person
> @roles = %w{ a b c d }
> class << self; attr_reader :roles end
> def method_missing name,*args,&blk
> super unless @roles.map.to_s.include? name
> ### do delegation here
> @some_obj.send name, *args, &blk
> end
method_missing - is awfully slow, so if there is other option (like two
from Dan Yoder) than better to use them at the cost of a few more lines.