David,

Thanks for the highlights and the advice , I will consider keeping the 
'def xxx' syntax.

Gaspard

David A. Black wrote:
> I would consider rewriting that as:
> 
>    module A
>      def self.included(base)
>        base.class_eval do
>          def foo
>            puts "'foo' from A"
>          end
>        end
>      end
>    end
> 
> so as to normalize it back to the "def" form.
> 
> Keep in mind, too, that this is a bit fragile because the order
> matters. If you include the module first and then do has_many, (or
> attr_accessor, or any other instance-method generator), the has_many
> will "win".
> 
> 
> David

-- 
Posted via http://www.ruby-forum.com/.