Class: Zephira::Commands::Help
- Inherits:
-
Object
- Object
- Zephira::Commands::Help
- Defined in:
- lib/zephira/commands/help.rb
Class Method Summary collapse
Class Method Details
.description ⇒ Object
11 12 13 |
# File 'lib/zephira/commands/help.rb', line 11 def description "Display this help information" end |
.name ⇒ Object
7 8 9 |
# File 'lib/zephira/commands/help.rb', line 7 def name "help" end |
.run(agent:, args:) ⇒ Object
15 16 17 18 |
# File 'lib/zephira/commands/help.rb', line 15 def run(agent:, args:) lines = agent.commands.constants.map { |cmd| " /#{cmd.name}: #{cmd.description}" } puts "Available commands:\n#{lines.join("\n")}\n\n" end |