Class: OptionParser::CompletingHash
- Includes:
- Completion
- Defined in:
- opal/stdlib/optparse.rb
Overview
Hash with completion search feature. See OptionParser::Completion.
Instance Method Summary collapse
-
#match(key) ⇒ Object
Completion for hash key.
Methods included from Completion
candidate, #candidate, #complete, #convert, regexp
Methods inherited from Hash
#_initialize, #initialize, #pretty_print, #pretty_print_cycle, #to_json, #to_n
Constructor Details
This class inherits a constructor from Hash
Instance Method Details
#match(key) ⇒ Object
Completion for hash key.
936 937 938 939 940 941 |
# File 'opal/stdlib/optparse.rb', line 936 def match(key) *values = fetch(key) do raise AmbiguousArgument, catch(:ambiguous) { return complete(key) } end [key, *values] end |