Chapter 4. Programming Ruby

I learned very early the difference between knowing the name of something and knowing something.

—Richard Feynman

The previous chapter introduced the Ruby language by briefly surveying its syntax and the fundamental data types that you'll encounter over and over again as you learn about and develop more with Rails.

Chapter 3 started by introducing you to common tools of the trade like irb and ri, the concept that everything is an object, the conventions and rules for identifiers and variables, as well as essential types like numbers, Booleans, strings, symbols, regular expressions, ranges, arrays, and hashes.

This chapter brings your Ruby knowledge to the next level by exploring the essential aspects of object-oriented programming, the Ruby way. It does so by first covering basic concepts like defining methods, using conditional and looping statements, and handling exceptions, only to focus in the second half of the chapter on objects, classes, and modules. Finally, at the very end of the chapter, you'll find a short overview of a few available Ruby implementations.

Chapters 3 and 4 are therefore your Ruby tutorial before you begin to truly work with Rails in Chapter 5. With this roadmap in mind, let's get started.

Get Ruby on Rails® for Microsoft Developers 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.