Prefer protected over private for non-public attributes https://github.com/thoughtbot/guides/commit/bbc29d545080cd7bf0f51919753d02665f3e855f …
-
-
Replying to @thoughtbot
@thoughtbot Prefer using instance variables without accessors over doing that weirdness in the first place :p1 reply 0 retweets 1 like -
Replying to @bitsandhops
@rbondev Using attr_readers by default allows you to change from local variable to instance variable to computed property more easily.2 replies 2 retweets 1 like -
Replying to @sgrif2 replies 0 retweets 0 likes
-
Replying to @derekprior
@derekprior@sgrif@rbondev is “too many @’s all over the place” an acceptable reason?#irony2 replies 0 retweets 0 likes -
Replying to @jayroh
@jayroh@derekprior@sgrif Plus, now for some of those @'s you removed you now have self's for assignment, which is equally ugly.2 replies 0 retweets 0 likes -
Replying to @bitsandhops
@rbondev@derekprior@sgrif yeah there’s some trade-off having to use the self’s. At that point it’s a matter of preference1 reply 0 retweets 1 like -
Replying to @jayroh
@jayroh@derekprior@sgrif Agreed. Other tidbit is with protected and inheritance child classes can access parent's state directly.1 reply 0 retweets 0 likes -
Replying to @bitsandhops
@rbondev@jayroh@derekprior Children can access private and ivars, too...1 reply 0 retweets 0 likes -
Replying to @sgrif
@sgrif@jayroh@derekprior Are you sure about that? Without using send or instance_variable_get?1 reply 0 retweets 0 likes
@rbondev @jayroh @derekprior Positive.
-
-
Replying to @sgrif
@sgrif@jayroh@derekprior What am I doing wrong here? https://gist.github.com/rbishop/40138b6082ba26c681fc …0 replies 0 retweets 0 likesThanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.