josh ruby

Passing commandline parameter (arguments) to ruby file using optparser – Josh Software

Passing commandline parameter (arguments) to ruby file using optparser – Josh Software Ruby file accepts from command prompt in the form of array. Passing parameters ruby input.rb TOI DH TimesNew Accessing parameters # input.rb p ARGV # => [“TOI”, “DH”, “TimesNew”] p ARGV[0] # => “TOI” p ARGV[1] # => “DH” Optparser : parses commandline …

Passing commandline parameter (arguments) to ruby file using optparser – Josh Software Read More »