Class: SendCustomMail
- Inherits:
-
UserMailer
- Object
- ActionMailer::Base
- UserMailer
- SendCustomMail
- Defined in:
- lib/sendCustomMail.rb
Instance Attribute Summary collapse
-
#action_type ⇒ Object
readonly
Returns the value of attribute action_type.
-
#user_email ⇒ Object
readonly
Returns the value of attribute user_email.
Instance Method Summary collapse
-
#initialize(user_email, action_type) ⇒ SendCustomMail
constructor
A new instance of SendCustomMail.
- #process ⇒ Object
Methods inherited from UserMailer
Constructor Details
#initialize(user_email, action_type) ⇒ SendCustomMail
Returns a new instance of SendCustomMail.
6 7 8 9 |
# File 'lib/sendCustomMail.rb', line 6 def initialize(user_email, action_type) @user_email = user_email @action_type = action_type end |
Instance Attribute Details
#action_type ⇒ Object (readonly)
Returns the value of attribute action_type.
4 5 6 |
# File 'lib/sendCustomMail.rb', line 4 def action_type @action_type end |
#user_email ⇒ Object (readonly)
Returns the value of attribute user_email.
4 5 6 |
# File 'lib/sendCustomMail.rb', line 4 def user_email @user_email end |
Instance Method Details
#process ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/sendCustomMail.rb', line 11 def process if @action_type == "PROFILE" @message = "Profile updated successfully." end if @action_type == "ORDER" @message = "Order placed successfully." end UserMailer.new.send_email(@user_email, @message) end |