Tag Archives: environment

Ruby Command-Line Arguments

How can you access command-line arguments in Ruby? Through the special array called ARGV. It’s a zero-indexed array of your command-line arguments; so ARGV[0] is the first, ARGV[1] is the second, and so on. You can use ARGV.length to get the number of arguments, too. Continue reading

Posted in Development | Tagged , , | 1 Comment