O'Reilly logo

The Well-Grounded Rubyist by David A. Black

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 2. Objects, methods, and local variables

 

In this chapter

  • Objects and object-orientation
  • Innate vs. 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 the object to execute. We’ll look in considerable detail at the combined processes of message sending and method calling.

Ruby objects are often (perhaps most often) ...

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