Chapter 8. ARGUMENTS AND DOCUMENTATION

ARGUMENTS AND DOCUMENTATION

In this chapter, we will revisit some earlier scripts and tie them into a single, larger script. In doing so, we can abstract functions that are similar between each element. This abstraction not only saves space, it also results in larger chunks of reusable code.

To begin consolidating the scripts, we are going to rely on a library that will tie in essential parts of the scripts and allow a user to access specific functions through the command line. The library is called GetoptLong, because it gets options from the implied argument vector (or the command line). Many times, when a script is written, there may ...

Get Wicked Cool Ruby Scripts now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.