New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use attr_accesor when posible #9
Comments
Yes I am aware of For example, when I see Is there other drawback, perhaps performance-related, besides slightly longer code? |
Or maybe I can use |
Zuhao: On Sun, Jul 7, 2013 at 9:33 PM, Zuhao Wan notifications@github.com wrote:
Claudio Bustos |
I agree with @clbustos. I think you should use |
Thanks @clbustos and @MohawkJohn for reminding me. I apparently overlooked this issue in the first place. I've written a summary on this in my new blog post. |
In many classes, you use methods like
def name; @name; end
In Ruby, Is conventional to replace all getters and setters with
attr_reader :name
attr_writter :name
So, please use the first form and document it.
The text was updated successfully, but these errors were encountered: