Class: Artisan::Notifications::EventMailer

Inherits:
Object
  • Object
show all
Defined in:
lib/artisan/notifications/event_mailer.rb

Instance Method Summary collapse

Constructor Details

#initialize(project) ⇒ EventMailer

Returns a new instance of EventMailer.



5
6
7
8
9
# File 'lib/artisan/notifications/event_mailer.rb', line 5

def initialize(project)
  @project_name = project.name
  @configuration = project.project_configuration
  @archived = project.archived
end

Instance Method Details

#completed_story(story) ⇒ Object



18
19
20
21
22
23
# File 'lib/artisan/notifications/event_mailer.rb', line 18

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



11
12
13
14
15
16
# File 'lib/artisan/notifications/event_mailer.rb', line 11

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