RubyFlow The Ruby and Rails community linklog

Private Attribute Reader

Utility gem to easily declare private attribute readers in the same way you currently declare attr_reader

https://github.com/Austio/private_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

You can use basic HTML markup (e.g. <a>) or Markdown.

As you are not logged in, you will be
directed via GitHub to signup or sign in