Check out example codes for "how to add two variables into a hash ruby". It will help you in understanding the concepts better.

Code Example 1

your_hash = {}
hash_key = gets.chomp
hash_value = gets.chomp
your_hash[hash_key] = hash_value

Learn ReactJs, React Native from akashmittal.com