Class: ESM::Command::General::Help

Inherits:
ApplicationCommand show all
Defined in:
lib/esm/command/general/help.rb

Instance Method Summary collapse

Instance Method Details

#on_executeObject



33
34
35
36
37
38
39
40
41
42
43
44
45
46
# File 'lib/esm/command/general/help.rb', line 33

def on_execute
  case arguments.category
  when "commands"
    commands
  when "player commands"
    commands(types: [:player], include_development: false)
  when "admin commands"
    commands(types: [:admin], include_development: false)
  when ->(category) { ESM::Command.include?(category) }
    command
  else
    getting_started
  end
end