ruby/sample/getoptlong/permute.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

13 строки
298 B
Ruby
Исходник Обычный вид История

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}"