Class: Mailman::Configuration
- Inherits:
-
Object
- Object
- Mailman::Configuration
- Defined in:
- lib/mailman/configuration.rb
Instance Attribute Summary collapse
-
#graceful_death ⇒ boolean
rather than dropping dead immediately.
-
#ignore_stdin ⇒ boolean
Whether or not to ignore stdin.
-
#imap ⇒ Hash
The configuration hash for IMAP.
-
#logger ⇒ Logger
The application’s logger.
-
#maildir ⇒ String
The path to the maildir.
-
#poll_interval ⇒ Fixnum
The poll interval for POP3 or IMAP.
-
#pop3 ⇒ Hash
The configuration hash for POP3.
-
#rails_root ⇒ String
The path to the rails root.
-
#watch_maildir ⇒ boolean
Whether or not to watch for new messages in the maildir.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#graceful_death ⇒ boolean
rather than dropping dead immediately. Currently only works with POP3 connections.
35 36 37 |
# File 'lib/mailman/configuration.rb', line 35 def graceful_death @graceful_death end |
#ignore_stdin ⇒ boolean
Returns whether or not to ignore stdin. Setting this to true stops Mailman from entering stdin processing mode.
30 31 32 |
# File 'lib/mailman/configuration.rb', line 30 def ignore_stdin @ignore_stdin end |
#imap ⇒ Hash
Returns the configuration hash for IMAP.
11 12 13 |
# File 'lib/mailman/configuration.rb', line 11 def imap @imap end |
#logger ⇒ Logger
Returns the application’s logger.
5 6 7 |
# File 'lib/mailman/configuration.rb', line 5 def logger @logger end |
#maildir ⇒ String
Returns the path to the maildir.
18 19 20 |
# File 'lib/mailman/configuration.rb', line 18 def maildir @maildir end |
#poll_interval ⇒ Fixnum
Returns the poll interval for POP3 or IMAP. Setting this to 0 disables polling.
15 16 17 |
# File 'lib/mailman/configuration.rb', line 15 def poll_interval @poll_interval end |
#pop3 ⇒ Hash
Returns the configuration hash for POP3.
8 9 10 |
# File 'lib/mailman/configuration.rb', line 8 def pop3 @pop3 end |
#rails_root ⇒ String
Returns the path to the rails root. Setting this to false to stop the rails environment from loading.
26 27 28 |
# File 'lib/mailman/configuration.rb', line 26 def rails_root @rails_root end |
#watch_maildir ⇒ boolean
Returns whether or not to watch for new messages in the maildir. Settings this to false disables listening for file changes if using the Maildir receiver.
22 23 24 |
# File 'lib/mailman/configuration.rb', line 22 def watch_maildir @watch_maildir end |
Class Method Details
.from_hash(options) ⇒ Object
57 58 59 60 61 62 63 |
# File 'lib/mailman/configuration.rb', line 57 def self.from_hash() config = self.new .each do |key, value| config.send "#{key}=", value end config end |
Instance Method Details
#middleware ⇒ Object
37 38 39 |
# File 'lib/mailman/configuration.rb', line 37 def middleware @middleware ||= Mailman::Middleware.new end |