ActionMailer::Collector Ruby on Rails 5.1.2 Class ActionMailer::Collector < Object actionmailer/lib/action_mailer/collector.rb Methods A all, any C custom N new Included Modules AbstractController::Collector Attributes [R] responses Class Public methods new(context, &block) Link Source: show | on GitHub # File actionmailer/lib/action_mailer/collector.rb, line 10 def initialize(context, &block) @context = context @responses = [] @default_render = block end Instance Public methods all(*args, &block) Link Alias for: any any(*args, &block) Link Also aliased as: all Source: show | on GitHub # File actionmailer/lib/action_mailer/collector.rb, line 16 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 custom(mime, options = {}) Link Source: show | on GitHub # File actionmailer/lib/action_mailer/collector.rb, line 23 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