Chapter 2. Objects, methods, and local variables

This chapter covers
  • Objects and object orientation
  • Innate versus learned object capabilities
  • Method parameter, argument, and calling syntax
  • Local variable assignment and usage
  • Object references

In this chapter, we’ll begin exploring the details of the Ruby programming language. We’ll look first and foremost at the concept of the object, around which almost every line of Ruby code you’ll write will revolve. What you do with objects, broadly speaking, is send them messages, most of which correspond to names of methods that you’re asking objects to execute. We’ll look in considerable detail at the combined processes of message sending and method calling.

Ruby objects are ...

Get The Well-Grounded Rubyist, Third Edition 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.