Class: RubynCode::CLI::Commands::Help

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

Class Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Base

aliases, all_names, hidden?

Class Attribute Details

.registryObject

Returns the value of attribute registry.



36
37
38
# File 'lib/rubyn_code/cli/commands/help.rb', line 36

def registry
  @registry
end

Class Method Details

.command_nameObject



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

def self.command_name = '/help'

.descriptionObject



8
# File 'lib/rubyn_code/cli/commands/help.rb', line 8

def self.description = 'Show this help message'

Instance Method Details

#execute(_args, ctx) ⇒ Object



10
11
12
13
14
15
# File 'lib/rubyn_code/cli/commands/help.rb', line 10

def execute(_args, ctx)
  ctx.renderer.info('Available commands:')
  puts
  render_commands(self.class.registry)
  render_tips
end