airbnb / ruby

Ruby Style Guide

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Attributes

snood1205 opened this issue · comments

There is no style advice on attr_accessor, attr_reader, or attr_writer. Can this be added?

@snood1205 I think the reason for no style advice is there's nothing to say about it, style-wise. What would you want a style guide to say?

I agree with @BMorearty, the only advice I can think of is if you have the same attribute for attr reader and writer and they are both public, private, or protected then DRY it up and use attr accessor. But this seems common sense.