Class: OptionParser::CompletingHash
- Inherits:
-
Hash
- Object
- Hash
- OptionParser::CompletingHash
- Includes:
- Completion
- Defined in:
- lib/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
Instance Method Details
#match(key) ⇒ Object
Completion for hash key.
932 933 934 935 936 937 |
# File 'lib/optparse.rb', line 932 def match(key) *values = fetch(key) { raise AmbiguousArgument, catch(:ambiguous) {return complete(key)} } return key, *values end |