Thanks for the reply.
No private attributes? All protected. Check. I don't really know if this is a good thing in general, but I can't think of any counterexample at the moment so maybe yes.
Ok but now look
(Copy&Paste from http://www.rubycentral.com/book/tut_classes.html)
Protected access is used when objects need to access the internal state of other objects of the same class. For example, we may want to allow the individual Account objects to compare their raw balances, but may want to hide those balances from the rest of the world (perhaps because we present them in a different form).
attr_reader :balance # accessor method 'balance'
protected :balance # and make it protected
return @balance > other.balance
Because the attribute balance is protected, it's available only within Account objects.
If what you say is true, it means that this code (attr_reader, protected mumbo jumbo) is simply not necessary because I can (as I demonstrated before) access the attribute directly.
I think this example in docs is really missleading.
No I'm not comming from C#. I am programming mostly in PHP and Java. Thank god no J2EE