Class: Kublog::Network::Email::SingleEmail
- Inherits:
-
Object
- Object
- Kublog::Network::Email::SingleEmail
- Defined in:
- lib/kublog/network/email.rb
Instance Attribute Summary collapse
-
#body ⇒ Object
Returns the value of attribute body.
-
#post ⇒ Object
Returns the value of attribute post.
-
#subject ⇒ Object
Returns the value of attribute subject.
-
#url ⇒ Object
Returns the value of attribute url.
Instance Method Summary collapse
-
#initialize(notification, user) ⇒ SingleEmail
constructor
A new instance of SingleEmail.
-
#perform ⇒ Object
Sends a single e-mail to the user.
Constructor Details
#initialize(notification, user) ⇒ SingleEmail
Returns a new instance of SingleEmail.
92 93 94 95 96 97 98 99 |
# File 'lib/kublog/network/email.rb', line 92 def initialize(notification, user) @subject = notification.title @notification = notification @body = notification.content @post = notification.post @url = notification.url @user = user end |
Instance Attribute Details
#body ⇒ Object
Returns the value of attribute body.
90 91 92 |
# File 'lib/kublog/network/email.rb', line 90 def body @body end |
#post ⇒ Object
Returns the value of attribute post.
90 91 92 |
# File 'lib/kublog/network/email.rb', line 90 def post @post end |
#subject ⇒ Object
Returns the value of attribute subject.
90 91 92 |
# File 'lib/kublog/network/email.rb', line 90 def subject @subject end |
#url ⇒ Object
Returns the value of attribute url.
90 91 92 |
# File 'lib/kublog/network/email.rb', line 90 def url @url end |
Instance Method Details
#perform ⇒ Object
Sends a single e-mail to the user
102 103 104 105 |
# File 'lib/kublog/network/email.rb', line 102 def perform PostMailer.new_post(self, @post, @user).deliver @notification.delivered end |