- 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.
推薦閱讀
- 手機安全和可信應用開發指南:TrustZone與OP-TEE技術詳解
- Learn Blockchain Programming with JavaScript
- Java編程指南:基礎知識、類庫應用及案例設計
- INSTANT CakePHP Starter
- Practical Windows Forensics
- Cassandra Data Modeling and Analysis
- 網絡爬蟲原理與實踐:基于C#語言
- INSTANT Django 1.5 Application Development Starter
- 高級語言程序設計(C語言版):基于計算思維能力培養
- Learning Docker Networking
- .NET Standard 2.0 Cookbook
- C++編程兵書
- Instant Pygame for Python Game Development How-to
- Flutter從0基礎到App上線
- Java性能權威指南