- 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.
推薦閱讀
- Web程序設計及應用
- Mastering Zabbix(Second Edition)
- R語言編程指南
- 基于差分進化的優化方法及應用
- Building Mobile Applications Using Kendo UI Mobile and ASP.NET Web API
- Python Geospatial Development(Second Edition)
- C++ 從入門到項目實踐(超值版)
- JAVA程序設計實驗教程
- Kotlin編程實戰:創建優雅、富于表現力和高性能的JVM與Android應用程序
- 計算機應用基礎實踐教程
- Python機器學習之金融風險管理
- Domain-Driven Design in PHP
- C語言程序設計
- C語言編程魔法書:基于C11標準
- 菜鳥成長之路