Method: CLAide::ARGV#options

Defined in:
lib/claide/argv.rb

#optionsHash

Returns A hash that consists of the remaining flags and options and their values.

Examples:


argv = CLAide::ARGV.new(['tea', '--no-milk', '--sweetener=honey'])
argv.options # => { 'milk' => false, 'sweetener' => 'honey' }

Returns:

  • (Hash)

    A hash that consists of the remaining flags and options and their values.



80
81
82
83
84
85
86
# File 'lib/claide/argv.rb', line 80

def options
  options = {}
  @entries.each do |type, (key, value)|
    options[key] = value unless type == :arg
  end
  options
end