Class: OptionParser::CompletingHash
- Inherits:
-
Hash
- Object
- Hash
- OptionParser::CompletingHash
- Includes:
- Completion
- Defined in:
- lib/llm/shell/internal/optparse/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, completable?, #complete, #convert, regexp
Instance Method Details
#match(key) ⇒ Object
Completion for hash key.
1007 1008 1009 1010 1011 1012 |
# File 'lib/llm/shell/internal/optparse/lib/optparse.rb', line 1007 def match(key) *values = fetch(key) { raise AmbiguousArgument, catch(:ambiguous) {return complete(key)} } return key, *values end |