18 Sep '12, 3pm

Pop quiz, hot shot! How do you protect your privates?

Pop quiz, hot shot! How do you protect your privates?

class Parent def mr_public 'public' end def access_other_protected(other) other.mr_protected end def access_other_private(other) other.mr_private end def access_self_protected self.mr_protected end def access_self_private self.mr_private end protected def mr_protected 'protected' end private def mr_private 'private' end end class Child < Parent def access_parent_protected mr_protected end def access_parent_private mr_private end end def attempt puts yield rescue puts 'forbidden' end parent = Parent.new other = Parent.new child = Child.new attempt { parent.mr_public } attempt { parent.mr_protected } attempt { parent.mr_private } attempt { parent.access_self_protected } attempt { parent.access_self_private } attempt { parent.access_other_protected(other) } attempt { parent.access_other_private(other) } attempt { child.access_parent_protected } attempt { child.access_parent_p...

Full article: http://robots.thoughtbot.com/post/31794893208/protect-you...

Tweets

Hublot Singapore Pop-up Store

Hublot Singapore Pop-up Store

luxuo.com 19 Sep '12, 6pm

Louis Vuitton opens first Maison in Southeast Asia Louis Vuitton is celebrating two premieres: its first luxury concept st...

IUCN World Conservation Congress calls on Chile...

switchboard.nrdc.org 15 Sep '12, 10am

Highlighting the ongoing international concern about the HidroAysén mega-dam proposal, the IUCN’s World Conservation Congr...

Bag Boy T-2000 travel cover earns spot on Golf ...

worldgolf.com 17 Sep '12, 7am

RICHMOND, Va. -- Bag Boy's popular T-2000 travel cover has landed a Gold Medal on Golf Digest's Hot List. The travel cover...