Method: Argvector#format_options
- Defined in:
- lib/supplemental/facets/argvector.rb
#format_options(assoc_options) ⇒ Object
Format flag options. This converts the associative array of options/flags into a hash. Repeat options will be placed in arrays.
329 330 331 332 333 334 335 336 337 338 339 |
# File 'lib/supplemental/facets/argvector.rb', line 329 def () opts = {} .each do |k,v| if opts.key?(k) opts[k] = [opts[k]].flatten << v else opts[k] = v end end return opts end |