class method
self.new
Ruby on Rails 3.1.12
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 466
def initialize(method_name=nil, *args)
super()
@_message = Mail.new
process(method_name, *args) if method_name
end
Defined in actionmailer/lib/action_mailer/base.rb line 466
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionMailer::Base