Class: UserBookingNotification

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

Returns a new instance of UserBookingNotification.



169
170
171
172
173
174
# File 'lib/bat_notifications.rb', line 169

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

Instance Method Details

#get_subjectObject



183
184
185
# File 'lib/bat_notifications.rb', line 183

def get_subject
    return @subject
end

#messageObject



176
177
178
179
180
181
# File 'lib/bat_notifications.rb', line 176

def message
    return "<h1>You have created a #{get_action}. Check out the details below </h1>\r\n 
    <p>Tutor Booked: #{get_receiver_full_name}</p> \r\n
    #{BookingFunctions.get_booking_message(get_content)} \r\n
    <p>Thank you for using bookatutor to create this booking</p>"
end