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

Code Example 1

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

Code Example 2

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

Learn ReactJs, React Native from akashmittal.com