From: Irulan Atreides Date: 2012-01-30T07:11:46+09:00 Subject: Re: Class variables Unsubscribe Saludos, El 29/01/2012, a las 19:37, "jake kaiden" escribió: >> Variables are not directly exposed, there must always be a method that >> sets / gets the values > > > you could use attr_accessor - > > > class FieldController > attr_accessor :space1, space2 > > def initialize > @space1 = [] > @space2 = [] > end > > end > > then.... > > fc = FieldController.new > p fc.space1 > fc.space1 << "hi there" > p fc.space1 > > > hth- > > - j > > -- > Posted via http://www.ruby-forum.com/. >