- Comprehensive Ruby Programming
- Jordan Hudgens
- 86字
- 2021-07-02 21:13:23
Getting input from the Ruby console using gets and chomp
Now that you know how to print values to the console, the next logical step is to know how to get input from users. In this section, we'll walk through how to use the built-in gets and chomp methods in Ruby.
In a real-world application, you'll most likely use web forms or some tool like that to get an input. However, using console tools you'll be able to mimic what a user types into a program.
推薦閱讀
- Vue.js 3.x快速入門
- UNIX編程藝術(shù)
- Java入門很輕松(微課超值版)
- 深入分布式緩存:從原理到實踐
- 運用后端技術(shù)處理業(yè)務(wù)邏輯(藍橋杯軟件大賽培訓(xùn)教材-Java方向)
- The Professional ScrumMaster’s Handbook
- Emotional Intelligence for IT Professionals
- Visual Basic 程序設(shè)計實踐教程
- Groovy 2 Cookbook
- Xamarin Cross-Platform Development Cookbook
- Android 游戲開發(fā)大全(第二版)
- 軟件測試技術(shù)
- Microsoft XNA 4.0 Game Development Cookbook
- Spring Boot 2+Thymeleaf企業(yè)應(yīng)用實戰(zhàn)
- HTML5程序開發(fā)范例寶典