From: Adam Bozanich Date: 2007-06-25T11:09:19+09:00 Subject: Re: variables to call methods in ruby... ------=_Part_150208_23620974.1182737359952 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline On 6/24/07, dblack@wobblini.net wrote: > > Hi -- > > On Mon, 25 Jun 2007, Adam Bozanich wrote: > > > I see your point, it just seems like using __send__ breaks > encapsulation. > > If a class is re-defining send for some reason, the user probably > shouldn't > > have to know/care about it. > > It's really more for cases where 'send' is used for something totally > different: > > class Message > def send > Net::SMTP.open .... > ... > end > end > > If someone wants to send (in the original sense) a message (in the > original sense :-) to a Message object, they'll end up calling the new > send. Doh! Good call. Time to kick my double underscore aversion ;) -Adam ------=_Part_150208_23620974.1182737359952--