Module: Dieses::Application::CLI::Multi

Defined in:
lib/dieses/application/cli/multi.rb

Constant Summary collapse

OPTIONS =
EMPTY_HASH

Class Method Summary collapse

Class Method Details

.call(*argv, **options) ⇒ Object



12
13
14
15
16
17
18
19
20
21
22
23
# File 'lib/dieses/application/cli/multi.rb', line 12

def self.call(*argv, **options)
  options = OpenStruct.new(OPTIONS.merge(options))
  args options(argv, options), argv

  index_file = argv.first

  return build_index(index_file, options) if options.index

  batch_run(index_file, options)
rescue OptionParser::InvalidOption, Dieses::Error => e
  abort(e.message)
end