class Rufo::Command

def self.parse_options(argv)

def self.parse_options(argv)
  exit_code, want_check = true, false
  filename_for_dot_rufo = nil
  loglevel = :log
  OptionParser.new do |opts|
    opts.version = Rufo::VERSION
    opts.banner = "Usage: rufo files or dirs [options]"
    opts.on("-c", "--check", "Only check formating changes") do
      want_check = true
    end
    opts.on("--filename=value", "Filename to use to lookup .rufo (useful for STDIN formatting)") do |value|
      filename_for_dot_rufo = value
    end
    opts.on("-x", "--simple-exit", "Return 1 in the case of failure, else 0") do
      exit_code = false
    end
    opts.on(Rufo::Logger::LEVELS, "--loglevel[=LEVEL]", "Change the level of logging for the CLI. Options are: error, warn, log (default), debug, silent") do |value|
      loglevel = value.to_sym
    end
    opts.on("-h", "--help", "Show this help") do
      puts opts
      exit
    end
  end.parse!(argv)
  [want_check, exit_code, filename_for_dot_rufo, loglevel]
end