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.



112
113
114
# File 'lib/action_mailer/parameterized.rb', line 112

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)



117
118
119
120
121
122
123
# File 'lib/action_mailer/parameterized.rb', line 117

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