I
Imobach González Sosa
Hi all,
I was discusing about Object Oriented Languages with a friend and I have a
question to do. Well, using Python, you can access to a private member of a
class just prepending an underscore and the class name (i.e.:
_myClass__myAttribute). It doesn't sound good to me. I don't like private
attributes being accesible from outside.
So, I'd like to know if you can do it on Ruby. I think no, that you must to
use a method, but I'm in doubt.
Thank you.
I was discusing about Object Oriented Languages with a friend and I have a
question to do. Well, using Python, you can access to a private member of a
class just prepending an underscore and the class name (i.e.:
_myClass__myAttribute). It doesn't sound good to me. I don't like private
attributes being accesible from outside.
So, I'd like to know if you can do it on Ruby. I think no, that you must to
use a method, but I'm in doubt.
Thank you.