Check out example codes for "ruby hello". It will help you in understanding the concepts better.

Code Example 1

print("hello world!")
# hello world!

Code Example 2

print("What is your name?")
name = gets.chop
print("Hello, #{name}!")

Learn ReactJs, React Native from akashmittal.com