Postingan

Menampilkan postingan dengan label encapsulation

Ruby1.8: 'private' doesn't give expected level of privacy

The classic OOP pattern usually called encapsulation implemented in ruby with private and protected keywords methods. The distinction between API and implementation works great with both. The problem is that private doesn't hide method for inherited classes.