So I read tip #5 in this article by Solnica. He says “I use class-level interfaces exclusively for building objects. It’s much easier to lower the coupling this way.” How is that different from a traditional ruby class such as below (or is it different)? My understanding of the interface pattern (a la Java) is that you specify methods in an interface so that a class which implements the interface must contain those methods.
class ZipCodeClass def initialize @zip_code = "10048" end def set_zip_code(zip_code="10048") @zip_code = zip_code end end