Instance and Class Variable Accessor Methods
When you define classes in Ruby, you must specify what kind of access you want to give Instance and Class attributes/variables which are defined in that class. The way you do it is that you write reader and writer methods. You can write these methods out explicitly or use the shorthand attribute (attr_) methods like […]