class Toys::CLI::DefaultCompletion

A Completion that implements the default algorithm for a CLI. This algorithm simply determines the tool and uses its completion.

Public Instance Methods

call(context) click to toggle source

Returns candidates for the current completion.

@param context [Toys::Completion::Context] the current completion

context including the string fragment.

@return [Array<Toys::Completion::Candidate>] an array of candidates

# File lib/toys/cli.rb, line 649
def call(context)
  context.tool.completion.call(context)
end