require 'optparse' require 'reek' require 'reek/adapters/report' module Reek # SMELL: Greedy Module # This creates the command-line parser AND invokes it. And for the # -v and -h options it also executes them. And it holds the config # options for the rest of the application. class Options CTX_SORT = '%m%c %w (%s)' SMELL_SORT = '%m[%s] %c %w' def initialize(argv) @argv = argv @parser = OptionParser.new @quiet = false @show_all = false @format = CTX_SORT set_options end def parse @parser.parse!(@argv) @argv end def set_options @parser.banner = <