Class: Bridgetown::Commands::Help

Inherits:
Bridgetown::Command show all
Defined in:
bridgetown-core/lib/bridgetown-core/commands/help.rb

Instance Method Summary collapse

Methods inherited from Bridgetown::Command

command_line, start, summary

Instance Method Details

#callObject



10
11
12
13
14
15
16
17
18
19
# File 'bridgetown-core/lib/bridgetown-core/commands/help.rb', line 10

def call
  found_command = parent.class.table[:command].commands[command]

  found_command&.new(name: command)&.print_usage

  return if found_command

  puts "Unknown command: #{command}\n\n"
  parent.print_usage
end