On Sat, May 15, 2010 at 7:24 PM, Intransition <transfire / gmail.com> wrote:
>
>
> On May 15, 1:05=A0pm, Robert Dober <robert.do... / gmail.com> wrote:
>> <snip>
>> module M> =A0 =A0def self.m
>> > =A0 =A0 =A0@x ||=3D 20
>> > =A0 =A0end
>> > =A0end
>>
>> I do not think this is necessary
>>
>> > =A0class X
>> > =A0 =A0include M
>> > =A0 =A0def self.m
>> > =A0 =A0 =A0anc =3D ancestors.find{ |a| a.respond_to?(:m) }
>> > =A0 =A0 =A0anc.m if anc
>>
>> replace this with instance_variable_get (potentially guarded by an
>> instance_variable_defined?)
>
> How would that work?
>
>> I wonder however, what this is good for, I am not sure I understood
>> what OP wanted
>
> Basically class inheritable attributes.
>
>
That's exactly what I gave you, good then :)
Cheers
R.


--=20
The best way to predict the future is to invent it.
-- Alan Kay