So when I call my script from the command line, I want it to take in an int and do something with the value:
ruby script.rb
puts ARGV[0], etc...
However, whenever the script is loaded or required and not called from command line, I want to completely skip this part of the code. How can I detect whether the script has been called via command line, or just loaded? Thanks!