title: Pass variables to Ruby script via command line
body: <p>I've installed RubyInstaller on Windows and I'm running <a href="http://wonko.com/post/ruby_script_to_sync_email_from_any_imap_server_to_gmail" rel="noreferrer">IMAP Sync</a> but I need to use it to sync hundreds of accounts. If I could pass these variables to it via command line I could automate the whole process better.</p>
  
  <pre><code># Source server connection info.
  SOURCE_NAME = 'username@example.com'
  SOURCE_HOST = 'mail.example.com'
  SOURCE_PORT = 143
  SOURCE_SSL  = false
  SOURCE_USER = 'username'
  SOURCE_PASS = 'password'
  
  # Destination server connection info.
  DEST_NAME = 'username@gmail.com'
  DEST_HOST = 'imap.gmail.com'
  DEST_PORT = 993
  DEST_SSL  = true
  DEST_USER = 'username@gmail.com'
  DEST_PASS = 'password'
  </code></pre>