A Mental Model for Understanding Encapsulation in Ruby

A discussion of encapsulation, how it is implemented in Ruby, and how exactly it benefits the code we write on a practical level.

Photo by The-Lore.com on Unsplash

The Hidden Nature of Objects

Using Methods to Open Objects to the Rest of the World

Controlling How Objects are Exposed with Method Access Control

The Practical Benefits of Encapsulating Data in Objects

Conclusion

--

--

Software engineering student at Launch School.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store