O'Reilly logo

Ruby Programming for the Absolute Beginner by Jerry Lee Ford

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 5. Working with Loops

Loops are an essential part of most Ruby scripts. Loops provide you with the ability to repeat a set of statements over and over again as many times as necessary to perform a particular task. Using a minimum amount of code, loops facilitate the development of scripts that can process huge amounts of data. Loops can also be used when interacting with users to create scripts capable of collecting any amount of input the user wants to supply. Ruby provides support for loops in a number of different ways, including built-in language constructs, statement modifiers, and object methods. Ruby also provides you with commands that you can use to alter and control the execution of loops. In addition to showing you how to develop ...

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