Class: UserReviewNotification

Inherits:
NotificationDecorator show all
Defined in:
lib/bat_notifications.rb

Instance Method Summary collapse

Methods inherited from NotificationDecorator

#async_email, #get_action, #get_content, #get_receiver, #get_receiver_full_name, #get_sender, #get_sender_full_name, #send_email, #send_notification_to_receiver, #send_notification_to_sender

Constructor Details

#initialize(notification) ⇒ UserReviewNotification

Returns a new instance of UserReviewNotification.



213
214
215
216
217
# File 'lib/bat_notifications.rb', line 213

def initialize(notification)
    super(notification)
    @action = "Review"
    @subject = "New #{@action} created"
end

Instance Method Details

#get_subjectObject



225
226
227
# File 'lib/bat_notifications.rb', line 225

def get_subject
    return @subject
end

#messageObject



219
220
221
222
223
# File 'lib/bat_notifications.rb', line 219

def message
    return "<h1>You created a new #{get_action}. Check out the details below</h1>
    <p>Reviewed: #{get_receiver_full_name}</p>
    #{ReviewFunctions.get_review_message(get_content)}"
end