- Comprehensive Ruby Programming
- Jordan Hudgens
- 45字
- 2021-07-02 21:13:27
Method chaining
Another neat thing we can do is join different methods together to get a custom output. For example, I can run this:
"Astros".reverse.upcase
The preceding code displays the SORTSA value.
This practice of combining different methods with a dot is called method chaining.