module Libis::RosettaChecker

Constants

VERSION

Public Class Methods

help() click to toggle source
# File lib/libis/rosetta_checker.rb, line 19
def self.help
  puts "Usage: #{main_command} [command [cmd_options]]"
  puts ''
  puts 'Commands are:'
  puts '  help : Show more help for a specific command'
  subcommands.each do |k,v|
    puts "  #{k.to_s} : #{v.short_desc}"
  end
  puts ''
  puts "See '#{main_command} help COMMAND' or '#{main_command} COMMAND --help' for more information."
  puts "A more detailed discussion on the toolkit is available on-line on the LIBIS teamwork" +
           " (https://libis.teamwork.com/#/notebooks/168158)."
  exit
end
main_command() click to toggle source
# File lib/libis/rosetta_checker.rb, line 11
def self.main_command
  @main_command ||= File.basename($0)
end
run() click to toggle source
# File lib/libis/rosetta_checker.rb, line 34
def self.run

  first_command = command = ARGV.shift
  help if command.nil?
  command = ARGV.shift if command == 'help'
  cmd_class = subcommands[command]
  help if cmd_class.nil?
  cmd_class.help if first_command == 'help'
  cmd_class.run
end
subcommands() click to toggle source
# File lib/libis/rosetta_checker.rb, line 15
def self.subcommands
  @subcommands ||= SubCommand.subcommands
end