diff options
Diffstat (limited to 'actionmailer/lib/action_mailer/delivery_methods.rb')
-rw-r--r-- | actionmailer/lib/action_mailer/delivery_methods.rb | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/actionmailer/lib/action_mailer/delivery_methods.rb b/actionmailer/lib/action_mailer/delivery_methods.rb index b795d4f80a..110f6769e6 100644 --- a/actionmailer/lib/action_mailer/delivery_methods.rb +++ b/actionmailer/lib/action_mailer/delivery_methods.rb @@ -1,8 +1,8 @@ require 'tmpdir' module ActionMailer - # This module handles everything related to mail delivery, from registering new - # delivery methods to configuring the mail object to be sent. + # This module handles everything related to mail delivery, from registering + # new delivery methods to configuring the mail object to be sent. module DeliveryMethods extend ActiveSupport::Concern @@ -42,22 +42,19 @@ module ActionMailer # Provides a list of emails that have been delivered by Mail::TestMailer delegate :deliveries, :deliveries=, :to => Mail::TestMailer - # Adds a new delivery method through the given class using the given symbol - # as alias and the default options supplied: - # - # Example: + # Adds a new delivery method through the given class using the given + # symbol as alias and the default options supplied. # # add_delivery_method :sendmail, Mail::Sendmail, - # :location => '/usr/sbin/sendmail', - # :arguments => '-i -t' - # + # location: '/usr/sbin/sendmail', + # arguments: '-i -t' def add_delivery_method(symbol, klass, default_options={}) class_attribute(:"#{symbol}_settings") unless respond_to?(:"#{symbol}_settings") send(:"#{symbol}_settings=", default_options) self.delivery_methods = delivery_methods.merge(symbol.to_sym => klass).freeze end - def wrap_delivery_behavior(mail, method=nil, options=nil) #:nodoc: + def wrap_delivery_behavior(mail, method=nil, options=nil) # :nodoc: method ||= self.delivery_method mail.delivery_handler = self @@ -79,7 +76,7 @@ module ActionMailer end end - def wrap_delivery_behavior!(*args) #:nodoc: + def wrap_delivery_behavior!(*args) # :nodoc: self.class.wrap_delivery_behavior(message, *args) end end |