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
Instance Method Details
#match(key) ⇒ Object
Completion for hash key.
667 668 669 670 671 |
# File 'lib/optparse.rb', line 667 def match(key) return key, *fetch(key) { raise AmbiguousArgument, catch(:ambiguous) {return complete(key)} } end |