Module: ReviewNotificationDecorator

Defined in:
lib/ReviewNotificationDecorator.rb

Class Method Summary collapse

Class Method Details

.get_review_actionObject



36
37
38
39
# File 'lib/ReviewNotificationDecorator.rb', line 36

def self.get_review_action
    init_review_decorator
    return @notification.get_action
end

.get_review_contentObject



41
42
43
44
45
46
# File 'lib/ReviewNotificationDecorator.rb', line 41

def self.get_review_content
    init_review_decorator
    content = @notification.get_content
    content_stars = content["review_stars"]
    return content_stars
end

.get_review_receiverObject



53
54
55
56
# File 'lib/ReviewNotificationDecorator.rb', line 53

def self.get_review_receiver
    init_review_decorator
    return @notification.get_receiver["lastname"]
end

.get_review_senderObject



48
49
50
51
# File 'lib/ReviewNotificationDecorator.rb', line 48

def self.get_review_sender
    init_review_decorator
    return @notification.get_sender["lastname"]
end

.get_user_review_notificationObject



63
64
65
66
# File 'lib/ReviewNotificationDecorator.rb', line 63

def self.get_user_review_notification
    init_review_decorator
    @notification = UserReviewNotification.new(@notification)
end

.get_user_review_notification_subjectObject



68
69
70
71
72
# File 'lib/ReviewNotificationDecorator.rb', line 68

def self.get_user_review_notification_subject
    init_review_decorator
    @notification = UserReviewNotification.new(@notification)
    return @notification.get_subject
end

.init_review_decoratorObject



28
29
30
31
32
33
34
# File 'lib/ReviewNotificationDecorator.rb', line 28

def self.init_review_decorator
    set_content
    set_sender
    set_receiver
    @notification = Notification.new(@sender, @receiver, @content)
    @notification = ReviewNotification.new(@notification)
end

.send_notificationObject



58
59
60
61
# File 'lib/ReviewNotificationDecorator.rb', line 58

def self.send_notification
    init_review_decorator
    return @notification.send_notification_to_receiver
end

.set_action(action) ⇒ Object



10
11
12
# File 'lib/ReviewNotificationDecorator.rb', line 10

def self.set_action(action)
    @action = action
end

.set_contentObject



15
16
17
# File 'lib/ReviewNotificationDecorator.rb', line 15

def self.set_content
    @content = Content.review_content
end

.set_receiverObject



23
24
25
# File 'lib/ReviewNotificationDecorator.rb', line 23

def self.set_receiver
    @receiver = NotificationDb.get_receiver
end

.set_senderObject



19
20
21
# File 'lib/ReviewNotificationDecorator.rb', line 19

def self.set_sender
    @sender = NotificationDb.get_sender
end

.user_send_notificationObject



74
75
76
77
78
# File 'lib/ReviewNotificationDecorator.rb', line 74

def self.user_send_notification
    init_review_decorator
    @notification = UserReviewNotification.new(@notification)
    return @notification.send_notification_to_sender
end