| Class | GetOptions |
| In: |
lib/getoptions.rb
|
| Parent: | Object |
| inspect | -> | to_s |
Parse input based on metadata in option_specs.
opt = GetOptions.new(%w(help verbose! strarg=s)) puts "I'm going to go do stuff..." if (opt.verbose) ...
Returns the value of the specified option. If the option was in the specification but not found in the input data, nill is returned.
Iterate over each parsed option name and value.
opt.each do |key,val|
puts "#{key} -> #{val.inspect}"
end