Why use Ruby’s attr_accessor, attr_reader and attr_writer?
You may use the different accessors to communicate your intent to someone reading your code, and make it easier to write classes which will work correctly no matter how their public API is called. Here, I can see that I may both read and write the age. Here, I can see that I may only … Read more