Summary

We've learned today about Ruby's support for maintaining different areas of program logic in separate files. A script can take advantage of the functionality of the code in other files by the use of the require and include methods. Those other files may have been written by you, or they may have come from other authors who solved certain problems so that you wouldn't have to.

Also, we have started to wrestle with the ideas of abstraction and generalization. It is possible, we have found, to make our solutions too general or not general enough. Finding the most useful abstractions for each situation is a skill that comes with experience. It's a worthwhile skill to develop, because the Ruby Way is to solve most problems exactly once. Every ...

Get Sams Teach Yourself Ruby in 21 Days now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.