Skip to Content
Polished Ruby Programming
book

Polished Ruby Programming

by Jeremy Evans
July 2021
Intermediate to advanced
434 pages
8h 36m
English
Packt Publishing
Content preview from Polished Ruby Programming

Chapter 4: Methods and Their Arguments

Methods are where almost all the logic is implemented in Ruby programs. Along with how you design your classes, how you design your methods makes all the difference between a library that is a joy to use and one that inspires dread. In this chapter, you'll learn how to design methods to inspire joy in the users of the methods, even if you are the only user. You'll learn how limiting the visibility of methods allows for easier refactoring down the line. You'll also gain a greater understanding of Ruby's object model by learning what class methods actually are.

In this chapter, we will cover the following topics:

  • Understanding that there are no class methods, only instance methods
  • Naming methods
  • Using the ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Programming Ruby 3.3

Programming Ruby 3.3

Noel Rappin, Dave Thomas
The Ruby Programming Language

The Ruby Programming Language

David Flanagan, Yukihiro Matsumoto

Publisher Resources

ISBN: 9781801072724Supplemental Content