123456789_123456789_123456789_123456789_123456789_

Class: Gem::OptionParser::CompletingHash

Relationships & Source Files
Super Chains via Extension / Inclusion / Inheritance
Class Chain:
self, Hash
Instance Chain:
self, Completion, Hash
Inherits: Hash
  • Object
Defined in: lib/rubygems/optparse/lib/optparse.rb

Overview

Hash with completion search feature. See Completion.

Instance Method Summary

Instance Method Details

#match(key)

Completion for hash key.

[ GitHub ]

  
# File 'lib/rubygems/optparse/lib/optparse.rb', line 938

def match(key)
  *values = fetch(key) {
    raise AmbiguousArgument, catch(:ambiguous) {return complete(key)}
  }
  return key, *values
end