From: Robert Klemme Date: 2012-09-19T17:36:54+09:00 Subject: Re: Class variables On Tue, Sep 18, 2012 at 12:07 PM, Aleksander Ciesielski wrote: > Is it obligatory to use instance variables in classes? Can't we just write > something like this: > > class Test > var = 5 > > def show > puts var > end > end > > test = Test.new > test.show > p test.var You can do that. But it probably does not lead to the result you are expecting / wanting. What is it that you want to achieve? Cheers robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/