Class: OptionParser::CompletingHash

Inherits:
Hash
  • Object
show all
Includes:
Completion
Defined in:
lib/rubysl/optparse/optparse.rb

Overview

Hash with completion search feature. See OptionParser::Completion.

Instance Method Summary collapse

Methods included from Completion

#complete, #convert

Instance Method Details

#match(key) ⇒ Object

Completion for hash key.



669
670
671
672
673
# File 'lib/rubysl/optparse/optparse.rb', line 669

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