Private Attribute Reader
Utility gem to easily declare private attribute readers in the same way you currently declare attr_reader
Made a library? Written a blog post? Found a useful tutorial? Share it with the Ruby community here or just enjoy what everyone else has found!
Utility gem to easily declare private attribute readers in the same way you currently declare attr_reader
Comments
You could also do like
def private_attr_reader(*names) send(:attr_reader, *names) send(:private, *names) end
Sorry fo the bad code formatting.
:) all good on the formatting, thanks for the feedback/idea!
Post a comment