1module Archived
 
2  class DeliverPetitionEmailJob < ApplicationJob
 
3    include EmailDelivery
 
4
 
5    attr_reader :email
 
6
  • Complexity 1 » saikuro
7    def perform(**args)
 
8      @email = args[:email]
 
 9      super
 
10    end
 
  • Complexity 2 » saikuro
12    def create_email
 
13      if signature.creator?
 
14        mailer.email_creator petition, signature, email
 
15      else
 
16        mailer.email_signer petition, signature, email
 
17      end
 
18    end
 
19  end
 
20end