© Carleton DiLeo, Peter Cooper 2021
C. DiLeo, P. CooperBeginning Ruby 3https://doi.org/10.1007/978-1-4842-6324-2_3

3. Ruby’s Building Blocks: Data, Expressions, and Flow Control

Carleton DiLeo1   and Peter Cooper2
(1)
Boulder, CO, USA
(2)
Louth, UK
 

Computer programs spend nearly all their time manipulating data or waiting for data to arrive from elsewhere. We type in words, phrases, and numbers; listen to music; and watch videos, while the computer performs calculations, makes decisions, and relays information to us. To write computer programs, it’s essential to understand the basics of data and its manipulation.

This chapter looks at some of the basic forms of data that Ruby supports, along with how to work with and manipulate them. The ...

Get Beginning Ruby 3: From Beginner to Pro now with the O’Reilly learning platform.

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