Class: BookingNotification
- Inherits:
-
NotificationDecorator
- Object
- NotificationDecorator
- BookingNotification
- 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
-
#initialize(notification) ⇒ BookingNotification
constructor
A new instance of BookingNotification.
- #message ⇒ Object
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
#message ⇒ Object
156 157 158 159 160 |
# File 'lib/bat_notifications.rb', line 156 def 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_content)} " end |