Method: BigBrother::Runner.run

Defined in:
lib/big_brother/runner.rb

.run(cmd_line_args, options = {}) ⇒ Object



4
5
6
7
8
9
10
11
12
13
14
15
# File 'lib/big_brother/runner.rb', line 4

def self.run(cmd_line_args, options = {})
  BigBrother::Settings.load
  options = parse_options.merge(options)
  help_message = options[:help_message]
  if options[:version]
    print_version
  elsif options[:help] || cmd_line_args.empty? || cmd_line_args[0] == "help"
    stdout.puts help_message
  else
    parse_cmd_line_args(cmd_line_args)
  end
end