Module: BookingNotificationDecorator
- Defined in:
- lib/BookingNotificationDecorator.rb
Class Method Summary collapse
- .get_booking_action ⇒ Object
- .get_booking_content ⇒ Object
- .get_booking_creator ⇒ Object
- .get_user_booked ⇒ Object
- .get_user_booking_notification ⇒ Object
- .get_user_booking_notification_subject ⇒ Object
- .init_booking_decorator ⇒ Object
- .send_notification ⇒ Object
- .set_action(action) ⇒ Object
- .set_content ⇒ Object
- .set_receiver ⇒ Object
- .set_sender ⇒ Object
- .user_send_notification ⇒ Object
Class Method Details
.get_booking_action ⇒ Object
37 38 39 40 |
# File 'lib/BookingNotificationDecorator.rb', line 37 def self.get_booking_action init_booking_decorator return @notification.get_action end |
.get_booking_content ⇒ Object
42 43 44 45 46 47 |
# File 'lib/BookingNotificationDecorator.rb', line 42 def self.get_booking_content init_booking_decorator content = @notification.get_content booking_location = content["location"] return true if booking_location end |
.get_booking_creator ⇒ Object
49 50 51 52 |
# File 'lib/BookingNotificationDecorator.rb', line 49 def self.get_booking_creator init_booking_decorator return @notification.get_sender["lastname"] end |
.get_user_booked ⇒ Object
54 55 56 57 |
# File 'lib/BookingNotificationDecorator.rb', line 54 def self.get_user_booked init_booking_decorator return @notification.get_receiver["lastname"] end |
.get_user_booking_notification ⇒ Object
64 65 66 67 |
# File 'lib/BookingNotificationDecorator.rb', line 64 def self.get_user_booking_notification init_booking_decorator @notification = UserBookingNotification.new(@notification) end |
.get_user_booking_notification_subject ⇒ Object
69 70 71 72 73 |
# File 'lib/BookingNotificationDecorator.rb', line 69 def self.get_user_booking_notification_subject init_booking_decorator @notification = UserBookingNotification.new(@notification) return @notification.get_subject end |
.init_booking_decorator ⇒ Object
28 29 30 31 32 33 34 35 |
# File 'lib/BookingNotificationDecorator.rb', line 28 def self.init_booking_decorator set_content set_sender set_receiver @notification = Notification.new(@sender, @receiver, @content) @notification = BookingNotification.new(@notification) end |
.send_notification ⇒ Object
59 60 61 62 |
# File 'lib/BookingNotificationDecorator.rb', line 59 def self.send_notification init_booking_decorator return @notification.send_notification_to_receiver end |
.set_action(action) ⇒ Object
10 11 12 |
# File 'lib/BookingNotificationDecorator.rb', line 10 def self.set_action(action) @action = action end |
.set_content ⇒ Object
15 16 17 |
# File 'lib/BookingNotificationDecorator.rb', line 15 def self.set_content @content = Content.booking_content end |
.set_receiver ⇒ Object
23 24 25 |
# File 'lib/BookingNotificationDecorator.rb', line 23 def self.set_receiver @receiver = NotificationDb.get_receiver end |
.set_sender ⇒ Object
19 20 21 |
# File 'lib/BookingNotificationDecorator.rb', line 19 def self.set_sender @sender = NotificationDb.get_sender end |
.user_send_notification ⇒ Object
75 76 77 78 79 |
# File 'lib/BookingNotificationDecorator.rb', line 75 def self.user_send_notification init_booking_decorator @notification = UserBookingNotification.new(@notification) return @notification.send_notification_to_sender end |