Module: InboxNotificationDecorator
- Defined in:
- lib/InboxNotificationDecorator.rb
Class Method Summary collapse
- .get_inbox_action ⇒ Object
- .get_inbox_content ⇒ Object
- .get_inbox_receiver ⇒ Object
- .get_inbox_sender ⇒ Object
- .init_inbox_decorator ⇒ Object
- .send_notification ⇒ Object
- .set_action(action) ⇒ Object
- .set_content ⇒ Object
- .set_receiver ⇒ Object
- .set_sender ⇒ Object
Class Method Details
.get_inbox_action ⇒ Object
36 37 38 39 |
# File 'lib/InboxNotificationDecorator.rb', line 36 def self.get_inbox_action init_inbox_decorator return @notification.get_action end |
.get_inbox_content ⇒ Object
41 42 43 44 45 46 |
# File 'lib/InboxNotificationDecorator.rb', line 41 def self.get_inbox_content init_inbox_decorator content = @notification.get_content inbox_content = content["message_content"] return true if inbox_content end |
.get_inbox_receiver ⇒ Object
53 54 55 56 |
# File 'lib/InboxNotificationDecorator.rb', line 53 def self.get_inbox_receiver init_inbox_decorator return @notification.get_receiver["lastname"] end |
.get_inbox_sender ⇒ Object
48 49 50 51 |
# File 'lib/InboxNotificationDecorator.rb', line 48 def self.get_inbox_sender init_inbox_decorator return @notification.get_sender["lastname"] end |
.init_inbox_decorator ⇒ Object
28 29 30 31 32 33 34 |
# File 'lib/InboxNotificationDecorator.rb', line 28 def self.init_inbox_decorator set_content set_sender set_receiver @notification = Notification.new(@sender, @receiver, @content) @notification = InboxNotification.new(@notification) end |
.send_notification ⇒ Object
58 59 60 61 |
# File 'lib/InboxNotificationDecorator.rb', line 58 def self.send_notification init_inbox_decorator return @notification.send_notification_to_receiver end |
.set_action(action) ⇒ Object
10 11 12 |
# File 'lib/InboxNotificationDecorator.rb', line 10 def self.set_action(action) @action = action end |
.set_content ⇒ Object
15 16 17 |
# File 'lib/InboxNotificationDecorator.rb', line 15 def self.set_content @content = Content.inbox_content end |
.set_receiver ⇒ Object
23 24 25 |
# File 'lib/InboxNotificationDecorator.rb', line 23 def self.set_receiver @receiver = NotificationDb.get_receiver end |
.set_sender ⇒ Object
19 20 21 |
# File 'lib/InboxNotificationDecorator.rb', line 19 def self.set_sender @sender = NotificationDb.get_sender end |