# File bin/ruby-vpi, line 22 def show_help_info # show program description located at the top of this file puts File.read(__FILE__).split(/^$\n/)[1].gsub(/^# ?/, '') # show a list of available tools puts '', 'Tools:' Dir[File.join(TOOL_DIR, '*' + TOOL_EXT)].each do |file| tool = File.basename file, TOOL_EXT printf " %-10s %s", tool, File.new(file).readline.sub(/^#\s*/, '') end # show a list of available simulators require 'ruby-vpi' puts '', 'Simulators:' RubyVPI::SIMULATORS.each do |sim| printf " %-10s %s\n", sim.id, sim.name end end