Ruby IF no ARGV given
ruby
Solution
Check if it's `empty?` (or check its length):
if ARGV.empty?
puts ...
exit
end
Consider using any of the Ruby command line argument parsers, like OptionParser.
Problem
This is my code: ``` if ARGV[0] == false puts "Usage: ./script.rb argument" exit end print "Yey we got an argument: " ARGV[0] ``` But I just cant make the code check if ARGV[0] is given or not, how should I do that ?