Class: ActionMailer::Parameterized::Mailer

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

Overview

:nodoc:

Instance Method Summary collapse

Constructor Details

#initialize(mailer, params) ⇒ Mailer

Returns a new instance of Mailer.



24
25
26
# File 'lib/active_delivery/action_mailer/parameterized.rb', line 24

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)



30
31
32
33
34
35
36
# File 'lib/active_delivery/action_mailer/parameterized.rb', line 30

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