Class: EventMailer
- Inherits:
-
Object
- Object
- EventMailer
- Defined in:
- lib/artisan/event_mailer.rb
Instance Method Summary collapse
- #completed_story(story) ⇒ Object
-
#initialize(project) ⇒ EventMailer
constructor
A new instance of EventMailer.
- #new_assigned_user(story) ⇒ Object
Constructor Details
#initialize(project) ⇒ EventMailer
Returns a new instance of EventMailer.
3 4 5 6 7 |
# File 'lib/artisan/event_mailer.rb', line 3 def initialize(project) @project_name = project.name @configuration = project.project_configuration @archived = project.archived end |
Instance Method Details
#completed_story(story) ⇒ Object
16 17 18 19 20 21 |
# File 'lib/artisan/event_mailer.rb', line 16 def completed_story(story) if !@archived email_list = @configuration.story_completed_email_list.join(", ") Notifier.completed_story(@project_name, story.name, email_list).deliver if !email_list.empty? end end |
#new_assigned_user(story) ⇒ Object
9 10 11 12 13 14 |
# File 'lib/artisan/event_mailer.rb', line 9 def new_assigned_user(story) if !@archived email_list = @configuration.story_assigned_email_list.join(", ") Notifier.new_assigned_user(@project_name, story.assigned_user.full_name, story.name, email_list).deliver if !email_list.empty? end end |