Method: IMAPClient#initialize
- Defined in:
- lib/imap_client.rb
#initialize(options) ⇒ IMAPClient
Creates a new IMAPClient from options.
Options include:
+:Verbose+:: Verbose flag
+:Noop+:: Don't delete anything flag
+:Root+:: IMAP root path
+:Boxes+:: Comma-separated list of mailbox prefixes to search
+:Host+:: IMAP server
+:Port+:: IMAP server port
+:SSL+:: SSL flag
+:Username+:: IMAP username
+:Password+:: IMAP password
+:Auth+:: IMAP authentication type
203 204 205 206 207 208 209 210 211 212 213 214 215 216 |
# File 'lib/imap_client.rb', line 203 def initialize() @verbose = [:Verbose] @noop = [:Noop] @root = [:Root] root = @root root += "/" unless root.empty? boxes = [:Boxes].split(/,\s*/) @box_re = /^#{Regexp.escape root}#{Regexp.union(*boxes)}/ connect [:Host], [:Port], [:SSL], [:Username], [:Password], [:Auth] end |