From: Stefano Crocco Date: 2007-06-01T18:10:59+09:00 Subject: Re: How to specify access modifers for variables???? Alle venerd狸 1 giugno 2007, raja ha scritto: > thus IS IT IMPOSSIBLE TO DECLARE ACCESS > MODIFIERS FOR VARIABLES ? Yes, it's impossible. But you don't need it. Instance variables are always private. You can't do: an_object.@var (you'll get a SyntaxError exception if you try that) So, if you want to access an object's instance variable from outside the object, you need to provide a method which does that (note that all attr_reader do is to define a method which returns the instance variable). After defining the method, you can make it protected or private, if you need to. I hope this helps Stefano