Or just send which in most cases is preferable. They both do the same
thing (in fact I believe that one is an alias of the other). __send__
is there to cover cases where a class defines a send method for
another purpose.
路路路
On 3/13/07, Timothy Hunter <TimHunter@nc.rr.com> wrote:
You're telling the String object "muppet" to receive the message
"to_s", in a Smalltalk sense, or, in a Java sense, you're telling the
String object "muppet" to call the method "to_s".
On 3/14/07, Rick DeNatale <rick.denatale@gmail.com> wrote:
On 3/13/07, Timothy Hunter <TimHunter@nc.rr.com> wrote:
> Look up the __send__ method:
>
> obj.__send__("methodname", arg1, arg2)
Or just send which in most cases is preferable. They both do the same
thing (in fact I believe that one is an alias of the other). __send__
is there to cover cases where a class defines a send method for
another purpose.