class Gerrit::Command::Help

Displays help documentation.

Public Instance Methods

execute() click to toggle source
# File lib/gerrit/command/help.rb, line 4
def execute
  ui.print 'Usage: gerrit [command]'
  ui.newline

  ui.info 'Commands:'

  commands.each do |command|
    ui.print command
  end

  ui.newline
  ui.info "See #{Gerrit::REPO_URL}#usage for full documentation"
end

Private Instance Methods

commands() click to toggle source
# File lib/gerrit/command/help.rb, line 20
def commands
  Dir[File.join(File.dirname(__FILE__), '*.rb')]
    .map { |path| File.basename(path, '.rb') } - ['base']
end