On Sun, Oct 12, 2003 at 09:21:24PM +0900, ts wrote:
> E> elathan@velka:~/src/ruby> ruby test.rb 
> E> test.rb:7: undefined method `bar=' for Foo:Class (NoMethodError)
> 
> E> Is this behaviour normal?
> 
>  Yes, what you want is a class *instance* variable

Actually, I want an easy way to access a class variable from
another class. I construct objects, which I want them to
carry an array specific to their class:

class Foo
	@@info = ...
	...
end

class Bar
	@@info = ...
	...
end

As I see from your reply, the only way to access a class
variable from another class (or outside the class in general)
is to define self.foo and foo methods; foo stands for the class
var.

This sounds a little bit wierd to me, since, in the book[*] I have,
the author accesses a class variable implicitly, without having
define self.foo and foo inside the class.

Thanks for your reply!

[*] The Ruby Way - Hal Fulton

Enjoy,
-- 
University of Athens			I bet the human brain 
Physics Department				is a kludge --Marvin Minsky