Class: BookingNotification

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

Overview

configure notification so send to student and tutor upon booking creation modify @action and message within this class

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) ⇒ BookingNotification

Returns a new instance of BookingNotification.



150
151
152
153
154
# File 'lib/bat_notifications.rb', line 150

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

Instance Method Details

#messageObject



156
157
158
159
160
# File 'lib/bat_notifications.rb', line 156

def message
    return "<h1>You have a new  #{get_action}. Check out the details below</h1> \r\n
    <p>Booking from: #{get_sender_full_name}} </p>\r\n
    #{BookingFunctions.get_booking_message(get_content)} "
end