Forum: Ruby Re: class variable weirdness

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
397f61cc4458e13157b4facf72325e5f?d=identicon&s=25 Gennady Bystritsky (Guest)
on 2006-01-26 06:44
(Received via mailing list)
If you just want to get to a class method from the instance, you can do
a.class.foo=10

Gennady.
622fa8560c82dfaa59c91ec75efb0c19?d=identicon&s=25 Alex Combas (Guest)
on 2006-01-26 10:27
(Received via mailing list)
On 1/25/06, Gennady Bystritsky <Gennady.Bystritsky@quest.com> wrote:
> If you just want to get to a class method from the instance, you can do
> a.class.foo=10
>
> Gennady.

This is exactly what I was looking for, and
the cool part is that the syntax actually makes sense.
Very apprecaited.
This topic is locked and can not be replied to.