Check out example codes for "how to check ruby version". It will help you in understanding the concepts better.
Code Example 1
// Command line:
$ ruby -v
// Within irb type "RUBY_VERSION"
# => "2.4.1"
// If using RVM:
$ rvm current
# => ruby-2.4.1
Learn ReactJs, React Native from akashmittal.com