Sha256: 953bb2f233c1b4b85fafbeb7f5a910ca3ab5a367012edbc51743848af7ddffa2

Contents?: true

Size: 298 Bytes

Versions: 4

Compression:

Stored size: 298 Bytes

Contents

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

Version data entries

4 entries across 2 versions & 1 rubygems

Version Path
getoptlong-0.2.1 sample/getoptlong/argv.rb
getoptlong-0.2.1 sample/getoptlong/permute.rb
getoptlong-0.2.0 sample/getoptlong/argv.rb
getoptlong-0.2.0 sample/getoptlong/permute.rb