123456789_123456789_123456789_123456789_123456789_

Class: 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/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/optparse.rb', line 932

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