Module: Libis::RosettaChecker
- Defined in:
- lib/libis/rosetta_checker.rb,
lib/libis/rosetta_checker/version.rb,
lib/libis/rosetta_checker/sub_command.rb,
lib/libis/rosetta_checker/files_to_ingest_cleanup.rb,
lib/libis/rosetta_checker/options/files_to_ingest_cleanup.rb
Defined Under Namespace
Classes: FilesToIngestCleanup, FilesToIngestCleanupOptions, SubCommand
Constant Summary
collapse
- VERSION =
"1.0.3"
Class Method Summary
collapse
Class Method Details
.help ⇒ Object
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
# 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 ⇒ Object
11
12
13
|
# File 'lib/libis/rosetta_checker.rb', line 11
def self.main_command
@main_command ||= File.basename($0)
end
|
.run ⇒ Object
34
35
36
37
38
39
40
41
42
43
|
# 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 ⇒ Object
15
16
17
|
# File 'lib/libis/rosetta_checker.rb', line 15
def self.subcommands
@subcommands ||= SubCommand.subcommands
end
|