Learning about the importance of method visibility
While it is easy to develop code in Ruby without worrying about method visibility, neglecting to use method visibility wisely tends to result in more difficult long-term maintenance. If you never use one of Ruby's method visibility methods when developing, all the methods you define are public methods. When an object has a public method, it signals to the users of the object that the method is part of the object's supported interface, which, in general, should only change in a major update to the library containing the method. When a method is not public, it signals to the users of the object that the method is an implementation detail, and subject to change at any time.
Whether a method is a supported interface (public method) or an implementation detail (protected or private method) is critical to the long-term maintenance of a library. In general, the larger the supported interface for an object, the more difficult...