33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
# File 'lib/sublayer/cli.rb', line 33
def help(command = nil, subcommand = false)
if command.nil?
puts "Sublayer CLI"
puts
puts "Usage:"
puts " sublayer COMMAND [OPTIONS]"
puts
puts "Commands:"
print_commands(self.class.commands.reject { |name, _| name == "help" || name == "version" })
puts
print_commands(self.class.commands.select { |name, _| name == "help" })
print_commands(self.class.commands.select { |name, _| name == "version" })
puts
puts "Run 'sublayer COMMAND --help' for more information on a command."
else
super
end
end
|