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

Code Example 1

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

Code Example 2

# Hello World Program in Ruby!
puts "Hello, World!"

Learn ReactJs, React Native from akashmittal.com