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.
Gennady B. (Guest)
on 2006-01-26 07: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.
Alex C. (Guest)
on 2006-01-26 11:27
(Received via mailing list)
On 1/25/06, Gennady B. <removed_email_address@domain.invalid> 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.