barsoom / attr_extras

Takes some boilerplate out of Ruby with methods like attr_initialize.
MIT License
560 stars 31 forks source link

Rename pattr_initialize to prattr_initialize #8

Closed jamescook10 closed 9 years ago

jamescook10 commented 9 years ago

I think it would be less cryptic to rename pattr_initialize to prattr_initialize to indicate that it is a private reader that's being created, and not just use the 'p' from private.

For someone who doesn't have a lot of experience using this gem or a lack of development experience in general, I think this simple change could make it easier to understand what exactly is going on when you use this method.

To stop this from breaking a lot of stuff, you could just add this in as an alias for now :smiley:

jamescook10 commented 9 years ago

Just realised that this also implements a writer making my suggestion redundant. Was under the impression this just implemented a reader. Blame @victorarias :facepunch: :stuck_out_tongue_closed_eyes:

henrik commented 9 years ago

Ah, we always blame @victorarias ;) Thanks all the same for the feedback!