Class: NotificationRecipients::Builder::ProjectMaintainers
- Defined in:
- app/services/notification_recipients/builder/project_maintainers.rb
Constant Summary
Constants inherited from Base
Instance Attribute Summary collapse
-
#target ⇒ Object
readonly
Returns the value of attribute target.
Instance Method Summary collapse
- #acting_user ⇒ Object
- #build! ⇒ Object
-
#initialize(target, action:) ⇒ ProjectMaintainers
constructor
A new instance of ProjectMaintainers.
Methods inherited from Base
#add_recipients, #custom_action, #filter!, #group, #make_recipient, #notification_recipients, #project, #recipients, #recipients_target, #user_scope
Constructor Details
#initialize(target, action:) ⇒ ProjectMaintainers
Returns a new instance of ProjectMaintainers.
8 9 10 11 |
# File 'app/services/notification_recipients/builder/project_maintainers.rb', line 8 def initialize(target, action:) @target = target @action = action end |
Instance Attribute Details
#target ⇒ Object (readonly)
Returns the value of attribute target.
6 7 8 |
# File 'app/services/notification_recipients/builder/project_maintainers.rb', line 6 def target @target end |
Instance Method Details
#acting_user ⇒ Object
20 21 22 |
# File 'app/services/notification_recipients/builder/project_maintainers.rb', line 20 def acting_user nil end |
#build! ⇒ Object
13 14 15 16 17 18 |
# File 'app/services/notification_recipients/builder/project_maintainers.rb', line 13 def build! return [] unless project add_recipients(project.team.maintainers, :mention, nil) add_recipients(project.team.owners, :mention, nil) end |