Skip to content
Browse files

update ActionMailer documentation [ci skip]

  • Loading branch information...
1 parent e9acafd commit e2c7545cdd69376ed7e6ccb2084dda8cbd7571c2 Francesco Rodriguez committed Sep 17, 2012
View
2 actionmailer/lib/action_mailer/collector.rb
@@ -2,7 +2,7 @@
require 'active_support/core_ext/hash/reverse_merge'
require 'active_support/core_ext/array/extract_options'
-module ActionMailer #:nodoc:
+module ActionMailer
class Collector
include AbstractController::Collector
attr_reader :responses
View
19 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 ClassMethods
# 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 @@ def wrap_delivery_behavior(mail, method=nil, options=nil) #:nodoc:
end
end
- def wrap_delivery_behavior!(*args) #:nodoc:
+ def wrap_delivery_behavior!(*args) # :nodoc:
self.class.wrap_delivery_behavior(message, *args)
end
end
View
7 actionmailer/lib/action_mailer/mail_helper.rb
@@ -1,6 +1,7 @@
module ActionMailer
module MailHelper
- # Take the text and format it, indented two spaces for each line, and wrapped at 72 columns.
+ # Take the text and format it, indented two spaces for each line, and
+ # wrapped at 72 columns.
def block_format(text)
formatted = text.split(/\n\r?\n/).collect { |paragraph|
format_paragraph(paragraph)
@@ -30,9 +31,7 @@ def attachments
# Returns +text+ wrapped at +len+ columns and indented +indent+ spaces.
#
- # === Examples
- #
- # my_text = "Here is a sample text with more than 40 characters"
+ # my_text = 'Here is a sample text with more than 40 characters'
#
# format_paragraph(my_text, 25, 4)
# # => " Here is a sample text with\n more than 40 characters"
View
2 actionmailer/lib/action_mailer/railtie.rb
@@ -3,7 +3,7 @@
require "abstract_controller/railties/routes_helpers"
module ActionMailer
- class Railtie < Rails::Railtie
+ class Railtie < Rails::Railtie # :nodoc:
config.action_mailer = ActiveSupport::OrderedOptions.new
config.eager_load_namespaces << ActionMailer
View
3 actionmailer/lib/action_mailer/test_helper.rb
@@ -10,7 +10,8 @@ module TestHelper
# assert_emails 2
# end
#
- # If a block is passed, that block should cause the specified number of emails to be sent.
+ # If a block is passed, that block should cause the specified number of
+ # emails to be sent.
#
# def test_emails_again
# assert_emails 1 do

0 comments on commit e2c7545

Please sign in to comment.
Something went wrong with that request. Please try again.