class method
self.new
Ruby on Rails 4.1.16
Since v3.0.20Signature
self.new(method_name=nil, *args)
Instantiate a new mailer object. If method_name is not nil, the mailer will be initialized according to the named method. If not, the mailer will remain uninitialized (useful when you only need to invoke the “receive” method, for instance).
Parameters
-
method_nameopt = nil -
argsrest
Source
# File actionmailer/lib/action_mailer/base.rb, line 564
def initialize(method_name=nil, *args)
super()
@_mail_was_called = false
@_message = Mail.new
process(method_name, *args) if method_name
end
Defined in actionmailer/lib/action_mailer/base.rb line 564
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionMailer::Base