# File lib/mongrel/command.rb, line 43
43:       def initialize(options={})
44:         argv = options[:argv] || []
45:         @opt = OptionParser.new
46:         @opt.banner = Mongrel::Command::BANNER
47:         @valid = true
48:         # this is retarded, but it has to be done this way because -h and -v exit
49:         @done_validating = false
50:         @original_args = argv.dup
51: 
52:         configure
53: 
54:         # I need to add my own -h definition to prevent the -h by default from exiting.
55:         @opt.on_tail("-h", "--help", "Show this message") do
56:           @done_validating = true
57:           puts @opt
58:         end
59: 
60:         # I need to add my own -v definition to prevent the -v from exiting by default as well.
61:         @opt.on_tail("--version", "Show version") do
62:           @done_validating = true
63:           if VERSION
64:             puts "Version #{Mongrel::Const::MONGREL_VERSION}"
65:           end
66:         end
67: 
68:         @opt.parse! argv
69:       end