class Fission::CommandLineParser

def gather_commands_and_summaries

variable with the result.
Returns nothing. This will set the @command_names_and_summaries instance

# => { 'clone' => 'Clones a VM', 'stop' => 'Stops a VM' }
@cli.command_names_and_summaries

Examples

Internal: Determines all of the available commands and their summaries.
def gather_commands_and_summaries
  @command_names_and_summaries = Command.descendants.inject({}) do |result, klass|
    cmd = klass.new
    result[cmd.command_name] = cmd.summary
    result
  end
  @commands = @command_names_and_summaries.keys.sort
end