Method: DBA::Printer#print_usage
- Defined in:
- lib/dba/printer.rb
#print_usage(program_name, command_parameters) ⇒ Object
29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/dba/printer.rb', line 29 def print_usage(program_name, command_parameters) io.puts "Usage: #{program_name} COMMAND" io.puts command_parameters.each do |command_name, parameters| parameters = parameters.map { |type, name| format_parameter(type, name) }.compact.join(' ').upcase io.puts " #{program_name} #{command_name} #{parameters}" end io.puts end |