From: "Jan E." Date: 2012-04-03T20:20:35+09:00 Subject: Re: How to access Class variable? Ruby Mania wrote in post #1054699: > Hi Jan, > If I do test=Test.new , it will ask me to pass the parameters > (name,category) That's because you defined the initialize method with these two parameters. If you don't want to set the values on object creation, simply change the method accordingly (or leave it out completely). #### class Test attr_accessor :name, :category end test = Test.new # set @name to 'a' and @category to 'b' test.name = 'a' test.category = 'b' puts test.name puts test.category #### -- Posted via http://www.ruby-forum.com/.