Srijayanth Sridhar
7/15/2008 2:01:00 AM
Thank you both.
Jayanth
On Tue, Jul 15, 2008 at 2:32 AM, Ryan Davis <ryand-ruby@zenspider.com> wrote:
>
> On Jul 14, 2008, at 05:35 , Srijayanth Sridhar wrote:
>
>> Can I do something of this sort:
>>
>> class Hash
>> def who_am_i?
>> "#{self.symbol}"
>> end
>> end
>>
>> Where self.symbol gives me "a"?
>
> I totally agree with David but will take his idea a bit further:
>
> What you're asking has what we call a "bad design smell"... I have never
> seen a legitimate need for what you're asking for all the good reasons that
> David mentioned. You need to look at the design of your code and ask what
> you're really trying to accomplish. Something is currently wrong with the
> design you're currently attempting.
>
>
>