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 3. Working with Objects, Strings, and Variables

In the first two chapters of this book, you focused on learning about Ruby’s overall capabilities, how to experiment with Ruby using the irb, and how to create and execute Ruby scripts. Now it is time to begin digging into the language and seeing how things work. In this chapter, you will learn a number of fundamental object-oriented programming techniques, including how to define custom classes, which you can use as a template for instantiating new objects. You will also learn how to create and work with strings and to store and retrieve object data using variables. On top of all this, you will learn how to create a new Ruby script, the Ruby Virtual Crazy 8 Ball game.

Specifically, you will ...

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