Methods

Included Modules

Attributes

[R] responses

Class Public methods

new(context, &block)

📝 Source code
# File actionmailer/lib/action_mailer/collector.rb, line 12
    def initialize(context, &block)
      @context = context
      @responses = []
      @default_render = block
    end
🔎 See on GitHub

Instance Public methods

all(*args, &block)

Alias for: any

any(*args, &block)

Also aliased as: all
📝 Source code
# File actionmailer/lib/action_mailer/collector.rb, line 18
    def any(*args, &block)
      options = args.extract_options!
      raise ArgumentError, "You have to supply at least one format" if args.empty?
      args.each { |type| send(type, options.dup, &block) }
    end
🔎 See on GitHub

custom(mime, options = {})

📝 Source code
# File actionmailer/lib/action_mailer/collector.rb, line 25
    def custom(mime, options = {})
      options.reverse_merge!(content_type: mime.to_s)
      @context.formats = [mime.to_sym]
      options[:body] = block_given? ? yield : @default_render.call
      @responses << options
    end
🔎 See on GitHub