Class: Most::Starter
Constant Summary collapse
- CLI_OPTIONS =
{:submission_flag => ['-s', '--submission PATH', "Specifies the submission file"], :submission_parameters_flag => ['-p', '--parameters value[ value]', "Specifies parameters for the submission"], :output_file_flag => ['-f', '--file PATH', "Specifies the file where to output the report"], :version_flag => ['-v', '--version', 'Displays version information and exits.'], :help_flag => ['-h', '--help', 'Displays this help message and exits.'], :quiet_flag => ['-q', '--quiet', 'Starts in quiet mode.'], :verbose_flag => ['-V', '--verbose', 'Starts in verbose mode (ignored in quiet mode).'], :debug_flag => ['-d', '--debug', 'Starts in debug mode.']}
Instance Method Summary collapse
-
#initialize ⇒ Starter
constructor
A new instance of Starter.
- #options ⇒ Object
- #run ⇒ Object
Constructor Details
Instance Method Details
#options ⇒ Object
71 72 73 |
# File 'lib/most/starter.rb', line 71 def () CLI_OPTIONS end |
#run ⇒ Object
53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 |
# File 'lib/most/starter.rb', line 53 def run() if () begin if @modes[:verbose] @environment.("#{FULL_NAME} has started on #{Time.now}", true) end SERVICES[:executor].run() if @modes[:verbose] @environment.("#{FULL_NAME} has finished all tasks on #{Time.now}", true) end rescue Exception => e @environment.log_error(e, 'Command line interface failure') end end end |