The final result. Copy and paste it. It will work*.

* You must download optiflag first, of course

Our complete code:
require 'optiflag'

module DBChecker extend OptiFlagSet
  flag "log"
  flag "password"
  flag "user"

  and_process!
end 
puts "The user's user name is #{ ARGV.flags.user }"
puts "The user's password is #{ ARGV.flags.password }"
puts "The log directory is #{ ARGV.flags.log }"  

> What the user types in, and the results: ruby dbchecker.rb -log /var/log/dbchecker -user wluser -password ch3ckM8
The user's user name is wluser
The user's password is ch3ckM8
The log directory is /var/log/dbchecker