Class: Rixie::CLI::Commands::Help

Inherits:
Base
  • Object
show all
Defined in:
lib/rixie/cli/commands/help.rb

Instance Method Summary collapse

Methods inherited from Base

#complete, #initialize

Constructor Details

This class inherits a constructor from Rixie::CLI::Commands::Base

Instance Method Details

#call(_arg, cli:) ⇒ Object



11
12
13
14
15
16
17
# File 'lib/rixie/cli/commands/help.rb', line 11

def call(_arg, cli:)
  renderer.heading("Commands:")
  cli.commands.each do |cmd|
    renderer.text("#{renderer.accent("/#{cmd.name}")}#{cmd.description}")
  end
  renderer.text("#{renderer.accent("exit")}  — Quit")
end

#descriptionObject



9
# File 'lib/rixie/cli/commands/help.rb', line 9

def description = "Show available commands"

#nameObject



7
# File 'lib/rixie/cli/commands/help.rb', line 7

def name = "help"