mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
10 lines
237 B
Ruby
10 lines
237 B
Ruby
require 'getoptlong'
|
|
|
|
options = GetoptLong.new(
|
|
['--xxx', GetoptLong::REQUIRED_ARGUMENT],
|
|
['--yyy', GetoptLong::OPTIONAL_ARGUMENT],
|
|
['--zzz', GetoptLong::NO_ARGUMENT]
|
|
)
|
|
options.each do |option, argument|
|
|
p [option, argument]
|
|
end
|