From: Hugh Sasse Staff Elec Eng Date: 2000-03-17T10:09:23+00:00 Subject: [ruby-talk:01964] Re: Class Variables On 16 Mar 2000, Dave Thomas wrote: > "David Douthitt" writes: > [...] > > But I ALSO want to be able to do: > > > > fooey.setting1 = 6; > > Ah-ha! In that case, you want to use attributes > > class Foo > > attr_accessor :setting1, :setting2 > > def initialize > @setting1 = 2 > @setting2 = 5 > end > end Are these not accessing Instance variables, not class variables? I assume from the @ and that there is talk of 1.5.x introducing @@variables, that these are not true class variables, allowing instances of a class to share a variable between them. > > > Dave > Hugh hgs@dmu.ac.uk