Class: ActionMailer::Parameterized::Mailer

Inherits:
Object
  • Object
show all
Defined in:
lib/action_mailer/parameterized.rb

Overview

:nodoc:

Instance Method Summary collapse

Constructor Details

#initialize(mailer, params) ⇒ Mailer

Returns a new instance of Mailer.


106
107
108
# File 'lib/action_mailer/parameterized.rb', line 106

def initialize(mailer, params)
  @mailer, @params = mailer, params
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method_name, *args) ⇒ Object (private)


111
112
113
114
115
116
117
# File 'lib/action_mailer/parameterized.rb', line 111

def method_missing(method_name, *args)
  if @mailer.action_methods.include?(method_name.to_s)
    ActionMailer::Parameterized::MessageDelivery.new(@mailer, method_name, @params, *args)
  else
    super
  end
end