Module: SendNotification
- Defined in:
- lib/SendNotification.rb
Class Method Summary collapse
- .get_basic_notification_action ⇒ Object
- .get_basic_notification_base ⇒ Object
- .get_basic_notification_message ⇒ Object
- .get_basic_notification_receiver ⇒ Object
- .get_basic_notification_sender ⇒ Object
- .get_notification_base ⇒ Object
- .init_basic_decorator ⇒ Object
- .sendAppNotification ⇒ Object
- .sendBookingNotification ⇒ Object
- .sendMessageNotification ⇒ Object
- .sendReviewNotification(@sender, @receiver, @content) ⇒ Object
- .set_action(action) ⇒ Object
- .set_base_and_action(action) ⇒ Object
Class Method Details
.get_basic_notification_action ⇒ Object
49 50 51 52 |
# File 'lib/SendNotification.rb', line 49 def self.get_basic_notification_action init_basic_decorator return @basicNotification.get_action end |
.get_basic_notification_base ⇒ Object
69 70 71 72 |
# File 'lib/SendNotification.rb', line 69 def self.get_basic_notification_base init_basic_decorator return @basicNotification.get_notification_base end |
.get_basic_notification_message ⇒ Object
64 65 66 67 |
# File 'lib/SendNotification.rb', line 64 def self. init_basic_decorator return @basicNotification. end |
.get_basic_notification_receiver ⇒ Object
59 60 61 62 |
# File 'lib/SendNotification.rb', line 59 def self.get_basic_notification_receiver init_basic_decorator return @basicNotification.get_receiver end |
.get_basic_notification_sender ⇒ Object
54 55 56 57 |
# File 'lib/SendNotification.rb', line 54 def self.get_basic_notification_sender init_basic_decorator return @basicNotification.get_sender end |
.get_notification_base ⇒ Object
35 36 37 38 |
# File 'lib/SendNotification.rb', line 35 def self.get_notification_base @notificationBase = Notification.new return @notificationBase end |
.init_basic_decorator ⇒ Object
74 75 76 77 |
# File 'lib/SendNotification.rb', line 74 def self.init_basic_decorator set_base_and_action("Basic Notification") @basicNotification = BasicDecorator.new(@notificationBase, @action, "Sender", "Receiver", "Message" ) end |
.sendAppNotification ⇒ Object
26 27 28 29 30 31 |
# File 'lib/SendNotification.rb', line 26 def self.sendAppNotification set_base_and_action("Message") @bookingsNotification = AppMessageDecorator.new(@notificationBase, @action, "Femi", "Lanre", "You have a message from BookATutor") puts @bookingsNotification. puts @bookingsNotification. end |
.sendBookingNotification ⇒ Object
5 6 7 8 9 10 |
# File 'lib/SendNotification.rb', line 5 def self.sendBookingNotification set_base_and_action("Booking") @bookingsNotification = BookingsDecorator.new(@notificationBase, @action, "Femi", "Lanre", "I have booked you for a Session") puts @bookingsNotification. puts @bookingsNotification. end |
.sendMessageNotification ⇒ Object
19 20 21 22 23 24 |
# File 'lib/SendNotification.rb', line 19 def self.sendMessageNotification set_base_and_action("Message") @bookingsNotification = InboxDecorator.new(@notificationBase, @action, "Femi", "Lanre", "I have sent you a message") puts @bookingsNotification. puts @bookingsNotification. end |
.sendReviewNotification(@sender, @receiver, @content) ⇒ Object
12 13 14 15 16 17 |
# File 'lib/SendNotification.rb', line 12 def self.sendReviewNotification(@sender, @receiver, @content) set_base_and_action("Review") @bookingsNotification = ReviewDecorator.new(@notificationBase, @action, @sender, @receiver, @content) puts @bookingsNotification. puts @bookingsNotification. end |
.set_action(action) ⇒ Object
40 41 42 |
# File 'lib/SendNotification.rb', line 40 def self.set_action(action) @action = action end |
.set_base_and_action(action) ⇒ Object
44 45 46 47 |
# File 'lib/SendNotification.rb', line 44 def self.set_base_and_action(action) get_notification_base set_action(action) end |