O'Reilly logo

Wicked Cool Ruby Scripts by Steve Pugh

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required