Parent

Included Modules

Class Index [+]

Quicksearch

Mail::Configuration

The Configuration class is a Singleton used to hold the default configuration for all Mail objects.

Each new mail object gets a copy of these values at initialization which can be overwritten on a per mail object basis.

Public Class Methods

new() click to toggle source
    # File lib/mail/configuration.rb, line 17
17:     def initialize
18:       @delivery_method  = nil
19:       @retriever_method = nil
20:       super
21:     end

Public Instance Methods

delivery_method(method = nil, settings = {}) click to toggle source
    # File lib/mail/configuration.rb, line 23
23:     def delivery_method(method = nil, settings = {})
24:       return @delivery_method if @delivery_method && method.nil?
25:       @delivery_method = lookup_delivery_method(method).new(settings)
26:     end
lookup_delivery_method(method) click to toggle source
    # File lib/mail/configuration.rb, line 28
28:     def lookup_delivery_method(method)
29:       case method
30:       when nil
31:         Mail::SMTP
32:       when :smtp
33:         Mail::SMTP
34:       when :sendmail
35:         Mail::Sendmail
36:       when :exim
37:         Mail::Exim
38:       when :file
39:         Mail::FileDelivery
40:       when :smtp_connection
41:         Mail::SMTPConnection
42:       when :test
43:         Mail::TestMailer
44:       else
45:         method
46:       end
47:     end
lookup_retriever_method(method) click to toggle source
    # File lib/mail/configuration.rb, line 54
54:     def lookup_retriever_method(method)
55:       case method
56:       when nil
57:         Mail::POP3
58:       when :pop3
59:         Mail::POP3
60:       when :imap
61:         Mail::IMAP
62:       when :test
63:         Mail::TestRetriever
64:       else
65:         method
66:       end
67:     end
param_encode_language(value = nil) click to toggle source
    # File lib/mail/configuration.rb, line 69
69:     def param_encode_language(value = nil)
70:       value ? @encode_language = value : @encode_language ||= 'en'
71:     end
retriever_method(method = nil, settings = {}) click to toggle source
    # File lib/mail/configuration.rb, line 49
49:     def retriever_method(method = nil, settings = {})
50:       return @retriever_method if @retriever_method && method.nil?
51:       @retriever_method = lookup_retriever_method(method).new(settings)
52:     end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.