Module: Threatinator::CLI

Defined in:
lib/threatinator/cli.rb,
lib/threatinator/cli/parser.rb,
lib/threatinator/cli/action_builder.rb,
lib/threatinator/cli/run_action_builder.rb,
lib/threatinator/cli/list_action_builder.rb

Defined Under Namespace

Modules: Helpers Classes: ActionBuilder, ListActionBuilder, Parser, RunActionBuilder

Class Method Summary collapse

Class Method Details

.process!(args) ⇒ Object



6
7
8
9
10
11
12
13
14
15
16
17
# File 'lib/threatinator/cli.rb', line 6

def self.process!(args)
  parser = Parser.new
  ret = parser.parse(args)
  builder = parser.builder
  return ret if builder.nil?

  conf = Threatinator::Config::Logger.new(parser.config_hash['logger'])
  Threatinator::Logger.configure_logger(conf)

  builder.build.exec
  ret
end