3. Program Flow

Overview

By the end of the chapter, you will be able to utilize Boolean operators in Ruby programs; create and implement conditional expressions in Ruby; utilize ternary operators and ranges for programs; implement iterators on arrays and hashes and create programmatic loops with while, for, and until. The chapter aims to introduce us to different methods and entities involved in the Ruby program workflow.

Introduction

In the previous chapter, we studied the concept of arrays and hashes in Ruby. We also looked at different methods applied to arrays and hashes. In this chapter, we will be looking at how programs in Ruby are designed and used in applications.

Useful software programs are not simply a linear set of instructions; ...

Get The Ruby Workshop 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.