Check out example codes for "how to request user input in ruby". It will help you in understanding the concepts better.

Code Example 1

puts "Hello! My name is Kyle, what's yours?"
name = gets

Learn ReactJs, React Native from akashmittal.com