On 9/7/07, Nikolay Pavlov <qpadla / gmail.com> wrote:
> Hello all.
> I have a class with instance method "each" and i want to add variable
> aliases for it based on some preferences of the generated objects.
> Did some one know how i can achieve this?
>

This is one way. There are several.
I am assuming you mean that only that particular instance should have
this method, and not other instances of the same class.

metaclass = class << self;self;end
sym = :some_name_you_generated
metaclass.send :alias_method, sym, :each

More traditionally, this is usually a good place to consider using
inheritance. :)