I’d like to be able to support something like this when running my script from the command line:
script.rb -n 2 -t first.txt -t second.txt
I’d like to be able to take 1 or more t switches, but I have no clue how to achieve this. I would like to not have to do this:
script.rb -n 2 -tfirst.txt,second.txt
Got any ideas?
You might want to use OptionParser http://ruby-doc.org/stdlib/libdoc/optparse/rdoc/classes/OptionParser.html
Would something like this work ?