Preview: argv.rb
Size: 298 B
/proc/thread-self/root/opt/alt/ruby40/share/gems/gems/getoptlong-0.2.1/sample/getoptlong/argv.rb
require 'getoptlong'
options = GetoptLong.new(
['--xxx', GetoptLong::REQUIRED_ARGUMENT],
['--yyy', GetoptLong::OPTIONAL_ARGUMENT],
['--zzz', GetoptLong::NO_ARGUMENT]
)
puts "Original ARGV: #{ARGV}"
options.each do |option, argument|
p [option, argument]
end
puts "Remaining ARGV: #{ARGV}"
Directory Contents
Dirs: 0 × Files: 10