From: Tom Stone Date: 2010-04-03T05:31:23+09:00 Subject: Re: A little help needed Jonathan Nielsen wrote: > Yes, it can only be used within that class. You can, however, create > an accessor for it like this: > > class Test > def initialize > @x = 5 > end > > attr_accessor :x > end > > solution = Test.new > solution.x (=>5) > > solution.x = 6 > solution.x (=>6) > > > -Jonathan Nielsen Yep, already knew that. Thanks for clearing this up for me. I'm creating a game for school you see so I needed to know exacly what that meant. (Now I can understand more of what's happening in source code) ;) -- Posted via http://www.ruby-forum.com/.