- 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.
推薦閱讀
- 微服務與事件驅動架構
- Mastering QGIS
- Java加密與解密的藝術(第2版)
- Learning SQLite for iOS
- Hands-On Microservices with Kotlin
- Couchbase Essentials
- Raspberry Pi Robotic Blueprints
- Qlik Sense? Cookbook
- 從Power BI到Analysis Services:企業級數據分析實戰
- 程序員的成長課
- Visual Basic語言程序設計基礎(第3版)
- Oracle Database XE 11gR2 Jump Start Guide
- XML程序設計(第二版)
- Android應用程序設計
- Cloud Development andDeployment with CloudBees